wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

wtype didn't work in Wayfire (when using as a Key board shortcut)

Open liumingedwin opened this issue 1 year ago • 2 comments

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:

  1. Latest wayfire, wtype.
  2. Some keyboard shortcut set(e.g. W-1)
  3. wtype -M logo -P 1 -s 1

Expected behavior Shortcut triggered.

Wayfire version 0.8.1, Debian Trixie

liumingedwin avatar Jul 25 '24 01:07 liumingedwin

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")

killown avatar Jul 25 '24 02:07 killown

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

ammen99 avatar Jul 25 '24 05:07 ammen99

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).

ammen99 avatar Jun 23 '25 10:06 ammen99