Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to remap mouse wheel events to keyboard events? #34

Open
CarlosEkisde opened this issue Dec 6, 2020 · 5 comments
Open

Comments

@CarlosEkisde
Copy link

CarlosEkisde commented Dec 6, 2020

I want specifically to remap the horizontal scroll event to another thing recognizable by games. Currently I'm using evrouter on X11 to remap my mouse but when it works to assign keyboard events to the special function keys, when it comes to horizontal scroll buttons, it's not recognized by the vast majority of games, but it works pretty nice on every other type of program. So it seems a problem of the games which don't let players to assign some controls to the wheel events.

So I think I could solve my problem if some program was able to remap the wheel events to any other thing and hide the original event at the same time. Is this program able to do so. If yes, how? Thank you.

@philipl
Copy link
Owner

philipl commented Dec 6, 2020

Have you tried specifying the input events that you get from the wheel (find them with evtest, etc). It should just work as wheels send button events normally.

@CarlosEkisde
Copy link
Author

Have you tried specifying the input events that you get from the wheel (find them with evtest, etc). It should just work as wheels send button events normally.

Hi, I've checked the examples files. I see there is the possibility to remap mouse wheel events, but I don't see if there is any way to specify up and down or left and right movements. If there is none, only two remaps should be available, one for the code REL_WHEEL and another for REL_HWHEEL. evtest doesn't seem to provide normal button events besides of the two mentioned.

Is there any way to specify how I'm moving the wheel?

@philipl
Copy link
Owner

philipl commented Dec 18, 2020

Yeah, we don't support EV_REL events right now, but it could be added relatively easily.

@tg-x
Copy link

tg-x commented Apr 1, 2021

i'm trying to remap absolute to relative pointer events, seems like a similar issue?

@philipl what would be necessary to change to add EV_ABS & EV_REL support?

@philipl
Copy link
Owner

philipl commented Apr 1, 2021

I haven't looked into it. You'd need to sit down and start working on it. But note that actually mapping absolute to relative is more complex than the sorts of things we've discussed before. You'd have to do tracking of values over time to calculate the relative changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants