evdevremapkeys
evdevremapkeys copied to clipboard
Fix remapping values bleeding from last entry, set input props same as the original device.
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.
Thanks for doing this. Could I ask you to split it into two changes for clarity please?