Skip to content

keyboard: Do not override keymap on virtual keyboard

The authoritative source of keymap on virtual keyboards is the virtual-keyboard client. Vhanging its keymap causes the client to start sending invalid keycodes.

This change prevents applying gnome-settings layouts if the seat's keyboard is virtual.

There's a worrying question: does that mean layout changes are lost when virtual keyboard is active? The answer is: somehow, no! Typing with the physical keyboard afterwards still yields the selected layout, for some reason. That's what the logs say:

(phoc:1023328): dconf-DEBUG: 12:22:31.682: change_notify: /org/gnome/desktop/input-sources/sources
(phoc:1023328): phoc-keyboard-DEBUG: 12:22:31.683: Setting changed, reloading input settings
(phoc:1023328): phoc-keyboard-DEBUG: 12:22:31.683: Setting options 
(phoc:1023328): phoc-keyboard-DEBUG: 12:22:31.683: Switching to layout ru 
(phoc:1023328): phoc-keyboard-DEBUG: 12:22:31.696: Setting changed, reloading input settings
(phoc:1023328): phoc-keyboard-DEBUG: 12:22:31.697: Virtual keyboard in use, not switching layout

Perhaps there are multiple PhocKeyboard instances, it's not clear to me what its role is.

Solves squeekboard#225 (closed)

Edited by Dorota Czaplejewicz

Merge request reports