rvaiya / warpd

A modal keyboard-driven virtual pointer
MIT License
2.9k stars 131 forks source link

Warpd is completely blocking my keyboard #204

Closed matheusfillipe closed 1 year ago

matheusfillipe commented 1 year ago

Commit

Starting from commit: 40f7cf3 * @ Fix input processing (#171)

Steps to reproduce

OS: Arch Linux x86_64 DE: xinitrc WM: qtile Xorg

What I have tried

I tried to disable synergy, picom and conky. Those didn't affect at all.

I do remap my keyboard using xmodmap. I tis not a daemon but maybe it could be it.

$ cat .Xmodmap
clear Lock
keycode 66 =
keycode 66 = Escape Caps_Lock NoSymbol NoSymbol
keycode 91 =
keycode 91 mod2 = KP_Delete period

I've ran: setxkbmap -option which resets those remaps but I still have the same problem.

rvaiya commented 1 year ago

Can you post your full config and verify that this is still a problem on the tip of master (9037af)? Does it work on cccb9b6b? 40f7cf3 just changed some of the config parsing logic, it shouldn't have affected any of the X platform code. The latest commit works for me using i3.

matheusfillipe commented 1 year ago

cccb9b6 is working, is the build of warpd I've been using now. master right now has the same problem 6ece9f2. It is really on 40f7cf3. The UI stopped showing and the keyboard becomes blocked.

rvaiya commented 1 year ago

Can you post your config? I can't reproduce this.

matheusfillipe commented 1 year ago

Also I think i forgot to mention, pressing esc which should exit doesn't restore it, so is not like it is just the UI that is not showing.

activation_key: M-z
hint_activation_key: M-x
grid_activation_key: M-backslash
grid_nr: 3
grid_nc: 3
grid_keys: 7 8 9 u i o j k l
hint_bgcolor: #0f0f0fb5
hint_fgcolor: #ffff00ff
hint_size: 40
hint_border_radius: 15
cursor_size: 10
cursor_color: #00ff5e50
hint_chars: qwertyuiopasdfghjklz
left: b
left: S-h
right: w
right: S-l
up: S-k
down: S-j
buttons: m , . q a z x
hint_oneshot_key: M-A-x
history_activation_key: M-A-x
copy_and_exit: y
exit: esc
hint_exit: esc
grid_exit: esc
history: M-A-x
hint: M-x
hint2: x
grid: M-g
start: S-backslash
top: T
bottom: B
scroll_down: a
scroll_up: q
hint2_chars: iopjklm,.
hist_back: C-p
hist_forward: C-n
rvaiya commented 1 year ago

Thanks. It looks like this history: M-A-x was the culprit. There was a bug preventing overlapping activation and mode keys. Can you try the latest commit?

matheusfillipe commented 1 year ago

Very good! Works indeed! That was really fast so thanks. Here is another thing that might be related. I am actually remapping capslock to esc but that doesn't work anymore in warpd.

exit: Caps_Lock
hint_exit: Caps_Lock
grid_exit: Caps_Lock

Actually if I remove the remap with: setxkbmap -option it works, it used to work with capslock before so I guess now there's no way anymore?

rvaiya commented 1 year ago

Actually if I remove the remap with: setxkbmap -option it works, it used to work with capslock before so I guess now there's no way anymore?

The reason this used to work is because warpd was oblivious to the X keymap (a bug), which means it would ignore whatever logical layout you set using setxkbmap and friends. Since this has been fixed, it will correctly interpret capslock as control (which you can't remap in isolation in warpd), so you will need to find a workaround.

I also remap my capslock key to control (using keyd), but it functions as 'escape' when tapped (useful for vim) so I can still use it as an exit key in warpd. You might want try something similar.

matheusfillipe commented 1 year ago

Ok i will try keyd. Thanks, i think this one can be closed.

max-frai commented 1 year ago

Same problem for me on the latest commit. Some time ago (maybe 1.5 months ago) everything was okay. I don't have custom rebindings, etc. Latest mas os. My config:

buttons: n , m
oneshot_buttons: space - /
hint_border_radius: 10
hint_font: Iosevka
use_system_cursor: 1

So I run warpd, enter moving mode (any of them), and after some more clicks everything hangs and any keyboard events are blocked. So I open system monitor with my mouse and kill warpd process.

rvaiya commented 1 year ago

@max-frai Please open a separate bug report (your problem is likely unrelated) and include the output of warpd -v.