Skip to content
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

virtual-keyboard overrides all keyboard layouts #5134

Closed
any1 opened this issue Mar 23, 2020 · 4 comments
Closed

virtual-keyboard overrides all keyboard layouts #5134

any1 opened this issue Mar 23, 2020 · 4 comments
Labels
bug Not working as intended

Comments

@any1
Copy link
Contributor

any1 commented Mar 23, 2020

Steps to reproduce:

  • Run sway with a wayland backend: WLR_BACKENDS=wayland sway
  • Check keyboard layout in sway session: swaymsg -t get_inputs
  • Run wayvnc inside the session or in another shell: WAYLAND_DISPLAY=wayland-1 wayvnc --keyboard=is
  • Check the keyboard layout again and note that both "keyboards" now have the Icelandic layout.

This does not happen if smart grouping is turned off.

Looking at the debug log, I can see that the virtual keyboard always matches the group of the incumbent keyboard, which ought not happen with different layouts.

I have a theory that because virtual-keyboard sets the layout after it has created (and thus assigned to a group) the group's keyboard layout changes with the virtual keyboard's layout.

@emersion
Copy link
Member

The virtual keyboard should definitely not be grouped with something else.

@emersion emersion added the bug Not working as intended label Mar 30, 2020
@any1
Copy link
Contributor Author

any1 commented Apr 10, 2020

I've been thinking about how to disable smart grouping specifically for virtual keyboards and there does not seem to be an obvious answer. Matching on "virtual_keyboard" inside sway/input/keyboard.c seems like a rather finicky solution. Perhaps there should be a special "vendor" set for virtual devices, and that can be used for matching?

@emersion
Copy link
Member

Isn't it easy to detect keyboards created with the virtual-keyboard protocol?

@any1
Copy link
Contributor Author

any1 commented Apr 10, 2020

Never mind, there's a special event for it.

any1 added a commit to any1/sway that referenced this issue Apr 10, 2020
9ary pushed a commit to 9ary/sway9 that referenced this issue Apr 15, 2020
9ary pushed a commit to 9ary/sway9 that referenced this issue Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

2 participants