:: [DNG] X keyboard mapping lost for e…
Top Page
Delete this message
Reply to this message
Author: Joel Roth
Date:  
To: dng
Subject: [DNG] X keyboard mapping lost for external USB keyboard
Hi List,

I have keyboard mappings that run when I start X:

$ cat ~/bin/initkb

    # Use CapsLock as Ctrl, allow Ctrl-Alt-BackSpace to kill X server
    setxkbmap -option ctrl:nocaps,terminate:ctrl_alt_bksp


    # Don't beep
    xset b off


    # Disable PrintScreen (by mapping it to BackSpace)
    xmodmap -e 'keysym Print = BackSpace'


I notice that after a while, the Caps->Ctrl mapping for the
external keyboard is lost, which I reset by running the
above script.

I tried using cron for this, but the commands need
to be executed in an X environment, which cron
doesn't provide.

I suppose I can trigger it periodically from a script running
in a terminal. I would also like to find out what is
modifying my X keyboard settings.

It's always been that if I disconnect and reconnect an
external keyboard keyboard, the mappings will be lost. That
is reported in https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/287215

In my case, the loss occurs even without physical
disconnection. Perhaps some other initialization event is
reoccurring? Could udev be to blame? Xorg?

FWIW, I run devuan/jessie with i3 window manager, urxvt with
Gnu screen.

Interesting that it only affects the external keyboard, and
not the laptop's (T430's) built-in keyboard.

Any ideas?

Regards,

Joel
--
Joel Roth