Summary: | xkb set via xkbcomp does not seem to apply to -i <device> (or does not stick if used on general device) | ||
---|---|---|---|
Product: | xorg | Reporter: | ngoonee |
Component: | App/xkbcomp | Assignee: | Xorg Project Team <xorg-team> |
Status: | RESOLVED MOVED | QA Contact: | Xorg Project Team <xorg-team> |
Severity: | normal | ||
Priority: | medium | CC: | daniel, freedesktop, robsmith11 |
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
ngoonee
2015-08-06 03:58:34 UTC
xkbcomp and the xserver do not use libxkbcommon, so moving to xorg. I can confirm that using -i for a specific ID that it acts as a 'flip of a coin' if it actually takes affect. I have tested this across 3 different input devices with the following steps: * xkbcomp -I$HOME/.xkb ~/.xkb/keymap/skylight -i 12 $DISPLAY # To Apply the change * xkbcomp -I$HOME/.xkb ~/.xkb/keymap/default -i 12 $DISPLAY # To fall back to default symbols/layout There are no errors on output, only some minor warnings. On any given run of the command, it could work or not have any affect on the output of keybindings. OS: Gentoo 32bit xkbcomp Version: 1.2.4 and 1.3.0 X Version: 1.15.0 To add more detail to this issue, I have found an interesting experiment that allows the new mapping to always be applied, but with a crazy workaround. Find device ID for device in question > ~# xinput >? Virtual core pointer id=2 [master pointer (3)] >? ? Virtual core XTEST pointer id=4 [slave pointer (2)] >? ? Heng Yu Technology DONGLE id=9 [slave pointer (2)] >? ? Logitech USB Optical Mouse id=10 [slave pointer (2)] >? ? Sugar Creek Solutions LLC IMX101-01 v20.31 id=12 [slave pointer (2)] >? ? Sugar Creek Solutions LLC IMX101-01 v20.31 id=13 [slave pointer (2)] >? Virtual core keyboard id=3 [master keyboard (2)] > ? Virtual core XTEST keyboard id=5 [slave keyboard (3)] > ? Power Button id=6 [slave keyboard (3)] > ? Power Button id=7 [slave keyboard (3)] > ? Heng Yu Technology DONGLE id=8 [slave keyboard (3)] > ? Sugar Creek Solutions LLC IMX101-01 v20.31 id=11 [slave keyboard (3)] # Apply mapping to the device in question > xkbcomp -I$HOME/.xkb ~/.xkb/keymap/custom.xkb -i 11 -synch $DISPLAY Press a key on an input device that is *not* the targeted device Press a key on the target device and see that it is remapped successfully This can be shorted even more with a simple one liner: > xkbcomp -I$HOME/.xkb ~/.xkb/keymap/custom.xkb -i 11 -synch $DISPLAY && xdotool key Ctrl Seems really odd that you would need to activate a key on something that isn't the target device before the mapping takes affect. Any additional insight would be appreciated. I want to confirm that the "crazy workaround" works... and this looks like a bug. In may case : $ xinput --list # (summary) ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Lenovo ThinkPad Compact USB Keyboard with TrackPoint id=10 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Lenovo ThinkPad Compact USB Keyboard with TrackPoint id=15 [slave keyboard (3)] ↳ Lenovo ThinkPad Compact USB Keyboard with TrackPoint id=11 [slave keyboard (3)] $ xkbcomp -i 15 thinkpad_usb_layout.xkb $DISPLAY # change external keyboard map The last line has no effect by itself (whereas it should). It only has effect after pressing a key of the built-in laptop keyboard (this step should not be necessary!) Olivier (on Debian with xorg 1:7.7+16, x11-xkb-utils 7.7+3) I needed to use the "crazy workaround" on a fresh install of Arch linux to get a custom keyboard mapping to work with my 2nd keyboard. Please fix! Hello? Anyone? Is this package no longer maintained? This is a pretty blatant bug.. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/app/xkbcomp/issues/9. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.