Skip to content

kcms/keyboard: Initialize keyboard layout after attaching any input device

Slava Aseev requested to merge ptrnine/plasma-desktop:fork into master

Looks like Xorg server resets xkb mappings after attaching any input device, not only the keyboard or mouse (for example, after attaching a web camera device). So attaching an input device that is not keyboard/mouse may cause shortcuts to stop working.

How to reproduce:

  1. View current mappings via setxkbmap -print -verbose 10
  2. Attach (or re-attach) webcam:
  • this can be used for integrated web cameras on laptops:
# Enables webcam
echo "1" > /sys/bus/usb/devices/1-7/bConfigurationValue
# Disables webcam
echo "0" > /sys/bus/usb/devices/1-7/bConfigurationValue
  • or this to simply re-add uvcvideo module:
modprobe -r uvcvideo
modprobe uvcvideo
  1. View mappings again via setxkbmap -print -verbose 10: it will look reset. Hotkeys may stop working after switching the active window.

This is not a final change, perhaps DEVICE_KEYBOARD should be removed, because it actually doing the same as DEVICE_ANY.

EDIT @butirsky:
might fix BUG: 470737

Edited by Andrey Butirsky

Merge request reports