-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update sway 1.6 seems have some compatible with fcitx5 and alacritty #6193
Comments
You can try disabling the wayland front-end in fcitx5-configure. The reason may be that text intput protocol is not perfect. |
#6095 tracks a very similar issue. NB some of the people in that issue are not using fcitx. Personally, I see it if and only if fcitx5 is running. |
This should fix one of the unexpected key inputs problem on sway: swaywm/sway#6193 The problem occurs as follows: 1. press Ctrl+d to exit from terminal emulator 2. fcitx captures the key press event and enables repeat timer 3. terminal emulator exits (while the key is still pressed) 4. fcitx sends key repeat events indefinitely (since there's no release event) It's unclear whether this is a bug of the compositor (i.e. sway) or not, but I think it's better for fcitx to not carry the key-repeat state over to new keyboard grab.
Appears that key release event is lost at "7.input exit and enter to quit the alacritty window" So I made a patch to make fcitx stop the key-repeat timer on deactivate. I'm not pretty sure if |
This should fix one of the unexpected key inputs problem on sway: swaywm/sway#6193 The problem occurs as follows: 1. press Ctrl+d to exit from terminal emulator 2. fcitx captures the key press event and enables repeat timer 3. terminal emulator exits (while the key is still pressed) 4. fcitx sends key repeat events indefinitely (since there's no release event) It's unclear whether this is a bug of the compositor (i.e. sway) or not, but I think it's better for fcitx to not carry the key-repeat state over to new keyboard grab.
Note that the fcitx patch should mitigate some of the key repeats problem seen in sway 1.6, a. run fcitx5 in terminal -> ctrl+c to terminate -> "c" printed indefinitely IIUC, key events are handled as follows:
https://github.com/swaywm/sway/blob/1.6/sway/input/keyboard.c#L513 If the keyboard grab destroyed while a key pressed, future key release event from physical keyboard |
According to libinput, release events are generated when device is unplugged, and libinput copies this behavior for device removal. Let's do the same for our virtual keyboard. https://github.com/wayland-project/libinput/commit/8f846a41fa0566fbd72ece676656e20e56ce43e6 This is another attempt to fix swaywm#2034 and the following sway issue: swaywm/sway#6254 Note that we have other key repeating issues in sway, which aren't addressed by this patch. Since the virtual keyboard itself isn't destroyed when the keyboard grab is destroyed, we'll probably need some trick to reset the state of the corresponding virtual keyboard when the grab is released. swaywm/sway#6095 swaywm/sway#6193
According to libinput, release events are generated when device is unplugged, and libinput copies this behavior for device removal. Let's do the same for our virtual keyboard. https://github.com/wayland-project/libinput/commit/8f846a41fa0566fbd72ece676656e20e56ce43e6 This is another attempt to fix #2034 and the following sway issue: swaywm/sway#6254 Note that we have other key repeating issues in sway, which aren't addressed by this patch. Since the virtual keyboard itself isn't destroyed when the keyboard grab is destroyed, we'll probably need some trick to reset the state of the corresponding virtual keyboard when the grab is released. swaywm/sway#6095 swaywm/sway#6193
OS: archlinux
Sway Version: 1.6
Fcitx5 Version: 5.0.7
Alacritty Version: 0.7.2
Follow the below steps to reproduce the problem
1.open the sway
2.open a alacritty window
3.run fcitx5 in the alacritty window
4.switch to another workspace
5.open a alacritty window
6.make sure there is only one window in the current workspace which is the one you opened in step 5
7.input exit and enter to quit the alacritty window
8.switch to the first workspace which has the fcitx5 running on it
now the enter key input will be automaticly trigered.
The text was updated successfully, but these errors were encountered: