sezanzeb / input-remapper

๐ŸŽฎ โŒจ An easy to use tool to change the behaviour of your input devices.
GNU General Public License v3.0
3.72k stars 153 forks source link

Wheel not sending key per event #453

Open RalekArts opened 2 years ago

RalekArts commented 2 years ago

I'm trying to remap my Tartarus V2, which is basically a half keyboard. In terms of inputs, it is registered as essentially two inputs, a pointer and a keyboard. The keyboard side of it works fine, but the 'pointer' side, which is pretty much just the scroll wheel, doesn't 'work' 90% of the time.

Input remapper properly captures the key, (Wheel Up / Wheel Down) and allows me to assign something else to it. (In this case, left bracket and right bracket).

But once the Injection starts, the mouse wheel only types '[' or ']' once per down/upstroke. I'd like it to type the key once per scroll event, if possible. I've double checked with xinput test, and the mouse wheel is working properly and sending multiple events per scroll, but input remapper is only capturing the first.

I've tried setting keystroke_sleep_ms to 0 or 1 in the config, but no dice.

Is there a way to have it output 1 macro per scroll event?

Information:

  1. input-remapper 1.5.0 e31a1b2bc5d23fe13130afcc242063196335399f https://github.com/sezanzeb/input-remapper python-evdev 1.4.0

  2. Kubuntu 22.04

  3. x11

  4. Plasma

  5. lrwxrwxrwx 1 root root 0 Aug 8 22:13 /proc/1/exe -> /usr/lib/systemd/systemd

  6. (Thing of note: One shows up per down or up stroke on the wheel, not one per event.

    02:22:52.100432 43741 Service DEBUG consumer_control.py:86: Starting to listen for events from /dev/input/event29, fd 28
    02:22:52.100559 43741 Service DEBUG consumer_control.py:86: Starting to listen for events from /dev/input/event25, fd 29
    02:22:52.100624 43741 Service DEBUG consumer_control.py:86: Starting to listen for events from /dev/input/event24, fd 30
    02:22:52.195265 43622 GUI INFO user_interface.py:659: Group "Razer Razer Tartarus V2" is currently mapped
    02:22:55.508093 43741 Service DEBUG keycode_mapper.py:551: forwarding ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท ((2, 8, -1))
    02:22:55.559764 43741 Service DEBUG keycode_mapper.py:472: not forwarding release ยทยทยทยทยทยทยทยท ((2, 8, 0))
    02:22:55.968004 43741 Service DEBUG keycode_mapper.py:551: forwarding ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท ((2, 8, -1))
    02:22:56.022701 43741 Service DEBUG keycode_mapper.py:472: not forwarding release ยทยทยทยทยทยทยทยท ((2, 8, 0))
    02:22:56.248089 43741 Service DEBUG keycode_mapper.py:551: forwarding ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท ((2, 8, -1))
    02:22:56.313918 43741 Service DEBUG keycode_mapper.py:472: not forwarding release ยทยทยทยทยทยทยทยท ((2, 8, 0))
    02:22:56.787044 43741 Service DEBUG keycode_mapper.py:551: forwarding ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท ((2, 8, 1))
    02:22:56.896503 43741 Service DEBUG keycode_mapper.py:472: not forwarding release ยทยทยทยทยทยทยทยท ((2, 8, 0))
    02:22:56.958995 43741 Service DEBUG keycode_mapper.py:551: forwarding ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท ((2, 8, 1))
    02:22:57.016691 43741 Service DEBUG keycode_mapper.py:472: not forwarding release ยทยทยทยทยทยทยทยท ((2, 8, 0))
    02:22:57.086975 43741 Service DEBUG keycode_mapper.py:551: forwarding ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท ((2, 8, 1))
    02:22:57.153635 43741 Service DEBUG keycode_mapper.py:472: not forwarding release ยทยทยทยทยทยทยทยท ((2, 8, 0))
    02:22:57.244962 43741 Service DEBUG keycode_mapper.py:551: forwarding ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท ((2, 8, 1))
    02:22:57.307611 43741 Service DEBUG keycode_mapper.py:472: not forwarding release ยทยทยทยทยทยทยทยท ((2, 8, 0))
    02:22:57.447083 43741 Service DEBUG keycode_mapper.py:551: forwarding ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท ((2, 8, -1))
    02:22:57.513928 43741 Service DEBUG keycode_mapper.py:472: not forwarding release ยทยทยทยทยทยทยทยท ((2, 8, 0))
  7. /dev/input/event256:    input-remapper Razer Razer Tartarus V2 forwarded
    /dev/input/event257:    input-remapper Razer Razer Tartarus V2 forwarded
    /dev/input/event258:    input-remapper Razer Razer Tartarus V2 forwarded
    Select the device event number [0-258]: 256
    Input driver version is 1.0.1
    Input device ID: bus 0x3 vendor 0x1532 product 0x22b version 0x111
    Input device name: "input-remapper Razer Razer Tartarus V2 forwarded"
    Supported events:
    Event type 0 (EV_SYN)
    Event type 1 (EV_KEY)
    Event code 272 (BTN_LEFT)
    Event code 273 (BTN_RIGHT)
    Event code 274 (BTN_MIDDLE)
    Event code 275 (BTN_SIDE)
    Event code 276 (BTN_EXTRA)
    Event type 2 (EV_REL)
    Event code 0 (REL_X)
    Event code 1 (REL_Y)
    Event code 8 (REL_WHEEL)
    Event code 11 (REL_WHEEL_HI_RES)
    Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
    Event type 21 (EV_FF)
    Properties:
    Testing ... (interrupt to exit)
    Event: time 1660026321.095055, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
    Event: time 1660026321.095055, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -120
    Event: time 1660026321.095055, -------------- SYN_REPORT ------------
    Event: time 1660026321.259991, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
    Event: time 1660026321.259991, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -120
    Event: time 1660026321.259991, -------------- SYN_REPORT ------------
    Event: time 1660026321.632009, type 2 (EV_REL), code 8 (REL_WHEEL), value 1
    Event: time 1660026321.632009, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value 120
    Event: time 1660026321.632009, -------------- SYN_REPORT ------------
    Event: time 1660026321.877047, type 2 (EV_REL), code 8 (REL_WHEEL), value 1
    Event: time 1660026321.877047, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value 120
    Event: time 1660026321.877047, -------------- SYN_REPORT ------------
    Event: time 1660026322.109012, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
    Event: time 1660026322.109012, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -120
    Event: time 1660026322.109012, -------------- SYN_REPORT ------------
    Event: time 1660026322.511040, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
    Event: time 1660026322.511040, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -120
    Event: time 1660026322.511040, -------------- SYN_REPORT ------------
    Event: time 1660026322.642969, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
    Event: time 1660026322.642969, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -120
    Event: time 1660026322.642969, -------------- SYN_REPORT ------------
jonasBoss commented 2 years ago

We have a builtin timeout for scroll wheels and all EV_REL events, as it is usually not desired to spam a key that often. On the beta branch you can adjust that timeout (the Advanced Input Configuration button) such that all individual events are captured. Or you can write a macro like this: hold(key(b).wait(50))