sezanzeb / input-remapper

🎮 ⌨ An easy to use tool to change the behaviour of your input devices.
GNU General Public License v3.0
3.75k stars 155 forks source link

Changes between version 1 and 2 break modifier() behavior #794

Open IgorCordasProGlove opened 11 months ago

IgorCordasProGlove commented 11 months ago

I used to use a re-mapping to enter text snippets using a single key: For example to enter text like this: PasswoRD I would use the below macro and it used to work with version 1.x modify(Shift_L,key(p)).key(a).key(s).key(s).key(w).key(o).modify(Shift_L,key(r)).modify(Shift_L,key(d)) Now with version 2 it does not work (I did create a new macro manually not migrating configs).

Is this a bug, or is there some behavior change I am not aware of, is there an alternative way to do this, I need to output both upper and lowercase letters along with symbols like @

Below is some info about my environment:input-remapper 2.0.1 a012746a6b3d842943613fe80461bf50be3bc01d https://github.com/sezanzeb/input-remapper python-evdev 1.4.0 DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS" wayland ubuntu:GNOME

jonasBoss commented 11 months ago

That should work just fine. In fact the macro you provided works for me.

I wonder if there might be a race condition somewhere. We did reduce the pause we are doing between different keys so maybe your environment needs a longer pause between keys.

what is the result you are getting?

maddinpsy commented 3 months ago

I can confirm the same problem: DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS" wayland ubuntu:GNOME And indeed the timeout helped:

cat ~/.config/input-remapper-2/presets/AT_keyboard/new_preset.json [ { "input_combination": [ { "type": 1, "code": 26, "origin_hash": "748e31550c24fc009038438dc4fce338" } ], "target_uinput": "keyboard", "output_symbol": "modify(Shift_L,key(p)).key(a).key(s).key(s).key(w).key(o).modify(Shift_L,key(r)).modify(Shift_L,key(d))", "mapping_type": "key_macro", "macro_key_sleep_ms": 10 } ]