wtype didn't work in Wayfire (when using as a Key board shortcut)
Describe the bug Usually, wtype uses some Wayland keyboard protocol to emulate the Key down actions. However, it didn't work in wayfire but it's okay to type texts.
To Reproduce Steps to reproduce the behavior:
- Latest wayfire, wtype.
- Some keyboard shortcut set(e.g. W-1)
- wtype -M logo -P 1 -s 1
Expected behavior Shortcut triggered.
Wayfire version 0.8.1, Debian Trixie
just in case you are wondering if there is alternatives, you could use IPC https://github.com/killown/waypy
for example if you want to trigger a shortcut ALT+E sock.press_key("A-KEY_E")
Wtype uses different key codes with a custom mapping. By default bindings in Wayfire are based on hardware keycodes so that's where the confusion comes from.
As a workaround, you can try using the xkb-shortcuts plugin available in the latest git version. With it, I think that shortcuts ought to work with wtype (you'll have to update the config file though to use keysyms for bindings). Related: #1601 , #2247
I think there isn't much that we can do about this issue, either use xkb-shortcuts, use IPC, or make wtype use the proper keycodes (but I think wtype is aimed at automating typing, so xkb keysyms).