atx / wtype

xdotool type for wayland
MIT License
385 stars 13 forks source link

Regression on `-k` and some special characters #26

Closed sereinity closed 3 years ago

sereinity commented 3 years ago

Since commit 33b8942 "Convert wchar_to to xkb_keysym_t properly" because it shouldn't be done with the -k case.

./build/wtype -k 'Tab'

It types a (unicode U+FF09 Fullwidth Right Parenthesis) instead of a tab

I locally managed to make it work again with (it's more a hack than a proper fix as all named keys should be patched):

diff --git a/main.c b/main.c
index 810d027..54b7e17 100644
--- a/main.c
+++ b/main.c
@@ -384,6 +384,7 @@ static void print_keysym_name(wchar_t wchr, FILE *f)
                { L'\n', XKB_KEY_Return },
                { L'\t', XKB_KEY_Tab },
                { L'\e', XKB_KEY_Escape },
+               { XKB_KEY_Tab, XKB_KEY_Tab },
        };

        xkb_keysym_t keysym = xkb_utf32_to_keysym(wchr);
atx commented 3 years ago

Should be fixed in 6536edf.

sereinity commented 3 years ago

Thanks, fixed for ma scenario.