atx/wtype

Shift modifier isn't being applied

MungFuSensei opened this issue · 3 comments

wtype -M Shift -k o
wtype -M Shift o
wtype -M Shift -k o -m Shift
wtype -M shift -k o
wtype -M Shift -d 100 -k o
wtype -M "Shift" -k o
wtype -M "shift" -k o
wtype -M 'shift' -k o

And more combinations thereof. Absolutely none of it will return "O" (or whatever other key).

Tested on postmarketOS/edge/sway in foot and qutebrowser. Tested on void (non-musl)/dwl in foot.

Try wtype O

wtype -M ctrl -M shift -k tab -m shift -m ctrl and
wtype -M ctrl -M shift t -m shift -m ctrl
work as expected, but it seems that wtype -M shift o -m shift and other permutations of shift + letter just output a lowercase letter.

@atx I had the same issue on my project and the eventual solution was to:

  1. bind wl_seat
  2. get_keyboard on wl_seat
  3. get the keymap from wl_keyboard
  4. upload that to the virtual keyboard

You can pass the fd/size as is from the wl_keyboard to the virtual one.

https://github.com/galister/X11Overlay/blob/6290df5679e8f504bb039b0959d2e29f54f6909e/Desktop/Wayland/WaylandInterface.cs#L46-L49

Alternatively, just include the proper xkb_types and xkb_compat section in the keymap. You can generate one from your active one under xwayland:
setxkbmap -print | grep -v WARNING | xkbcli compile-keymap --from-xkb

Interestingly the same can be seen with inherently uppercase keysyms. For example, wtype -k Aring outputs å, not Å.