evdevremapkeys icon indicating copy to clipboard operation
evdevremapkeys copied to clipboard

Fix remapping values bleeding from last entry, set input props same as the original device.

Open shinyquagsire23 opened this issue 3 years ago • 1 comments

I ran into a bug with this config,

devices:
- input_name: 'ELAN9038:00 04F3:261A Pen'
  output_name: remap-pen
  remappings:
    'BTN_TOOL_RUBBER': [
         {'code': 'BTN_TOOL_PEN', 'value': 0},
         {'code': 'BTN_TOOL_RUBBER'}
    ]

where the BTN_TOOL_PEN entry would set event.value to 0 and the following entry would not actually set BTN_TOOL_RUBBER to the original event value but would keep it 0. The intended effect was to always unset BTN_TOOL_PEN if BTN_TOOL_RUBBER is ever set or unset. I also fixed another issue where device properties wouldn't be set, which was needed since this device is a stylus pen for a touchscreen and it had INPUT_PROP_DIRECT set.

shinyquagsire23 avatar Sep 04 '20 22:09 shinyquagsire23

Thanks for doing this. Could I ask you to split it into two changes for clarity please?

philipl avatar Sep 13 '20 05:09 philipl