#775476 xkb: assigning a per-keyboard layout doesn't work unless another keyboard is used

Package:
xserver-xorg-core
Source:
xorg-server
Description:
Xorg X server - core server
Submitter:
Andrew Shadura
Date:
2015-01-16 07:18:07 UTC
Severity:
minor
#775476#5
Date:
2015-01-16 07:13:54 UTC
From:
To:
Hi,

I'm using the following script to assign a different layout to a Sun
Type 6 keyboard. What I'd want is for example to have Menu button on a
regular keyboard to act as a language switch, and a hardware Compose
key on a Sun keyboard to act as Compose (it generates the same
keysym).

#!/bin/sh -x

xkbcomp -I$HOME/.xkb ~/.xkb_keymap :0

sun_id=$(xinput list | grep "HID 0430:0005" | grep -o 'id=[0-9]*' |
cut -d = -f 2)

if [ -n "$sun_id" ]
then
    xkbcomp -i "$sun_id" -I$HOME/.xkb ~/.xkb_keymap_sun :0
fi

However, after running this script the Sun keyboard has the default
keymap (~/.xkb_keymap) right until the moment I press any key on
another keyboard. If I don't have another keyboard connected, the
"sun" layout never works.

I'm not sure what package is responsible for this, so I'm filing it
against the core package, so at least you receive some info about my
system :)