per-keyboard user-defined X keymap and keyboard behaviour

martin f krafft madduck at madduck.net
Thu Jan 7 11:35:07 PST 2010


Hello folks,

I often use my Thinkpad with an external keyboard. When I plug in
the keyboard, it is initialised according to HAL with standard
symbols. While I load a custom keymap from Xsession [0] and also
call `xset r rate …` there, these settings do not take effect once
I plug in the external keyboard — while the internal keyboard works
exactly according to my keymap and rate settings, the external one
uses defaults for both, probably because xset/xkbcomp only affect
existing devices, not the defaults.

0. http://madduck.net/docs/extending-xkb

I seek a way to address this and have a few questions. I would
greatly appreciate all kinds of feedback.

1. I would prefer not to install my custom keymaps into /usr/lib, as
   that area of the filesystem is vendor-domain. However, I have not
   found a way to tell Xorg to look in other places too for xkb
   files.

   Is it possible to extend the XKEYBOARD search path, such that
   I could reference custom symbol tables from HAL's
   input.xkb.options property of a keyboard?

2. Is it possible to initialise delay and repeat rate of external
   keyboards to custom values (I run `xset r rate 255 47`)?

3. If (1) or (2) are not possible, then what else could I do? Is
   there a way to subscribe to Xorg in such a way that it informs me
   (or calls back) upon configuration of a new input device, such
   that I can relaod the keymap with xkbcomp and reset the
   delay/rate with xset?

4. After I plugged in the external keyboard, I have two keyboards.
   While the internal one uses my custom keymap and rate/delay
   settings, the external one has defaults. This makes me think that
   Xorg keeps these settings per-device. However, neither xset nor
   xkbcomp seem to allow me to specify a "target device", so that
   I do not seem to be able to configure just one device, but always
   have to configure all of them. Am I overlooking something?

Thank you for your time!

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
"arguments are extremely vulgar,
 for everyone in good society
 holds exactly the same opinion."
                                                        -- oscar wilde
 
spamtraps: madduck.bogus at madduck.net
-------------- next part --------------
#!/bin/sh

[ -x /usr/bin/hal-set-property ] || exit 0

exec hal-set-property --direct --udi "$UDI" --key input.xkb.model --string thinkpad
-------------- next part --------------
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.udi" string="/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port_logicaldev_input">
      <append key="info.callouts.add" type="strlist">local-setup-thinkpad-keyboard</append>
    </match>
  </device>
</deviceinfo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: digital_signature_gpg.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
URL: <http://lists.x.org/archives/xorg/attachments/20100108/9c681c7a/attachment.pgp>


More information about the xorg mailing list