evdevremapkeys icon indicating copy to clipboard operation
evdevremapkeys copied to clipboard

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

Open CarlosEkisde opened this issue 3 years ago • 5 comments

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.

CarlosEkisde avatar Dec 06 '20 00:12 CarlosEkisde

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.

philipl avatar Dec 06 '20 23:12 philipl

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?

CarlosEkisde avatar Dec 18 '20 12:12 CarlosEkisde

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

philipl avatar Dec 18 '20 19:12 philipl

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?

tg-x avatar Apr 01 '21 19:04 tg-x

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.

philipl avatar Apr 01 '21 22:04 philipl