When I plug an external keyboard into my laptop (which runs Xubuntu 18.04), I have to run xmodmap ~/.Xmodmap
to apply the changes to the second keyboard also. This bothers me.
Here is my .Xmodmap
:
! change CapsLock to Escape
clear Lock
keycode 0x42 = Escape
This is supposed to make Caps Lock work like Escape, and works well for the attached keyboard. But when I plug in my USB keyboard in the live system, its Caps Lock does not act like Escape, but still like Caps Lock. I have to run xmodmap ~/.Xmodmap
again, to also change the Caps Lock key of the USB keyboard.
If the USB keyboard is plugged in at boot time, there is no problem.
Is there a way to do this automatically, when a keyboard is plugged in?
0 Answers