As a programmer and console lover I very much prefer the US keyboard layout but when writing in German I need a convenient way to access the German Umlauts. I also hate the capslock key as I always hit it by accident, so I want to remove it from my layout. Before I knew how to do this I even ripped off the cap from the capslock key. Here is how:
Create a user xmodmap config file:
gedit ~/.XmodmapPaste these key mappings inside:
! Umlauts with modifier RIGHT ALT +Activate instantly:keycode 108 = Mode_switch keysym e = e E EuroSign keysym c = c C cent keysym a = a A adiaeresis Adiaeresis keysym o = o O odiaeresis Odiaeresis keysym u = u U udiaeresis Udiaeresis keysym s = s S ssharp
sudo gedit /etc/pm/sleep.d/50-xmodmap.shDid I mention that I hate the capslock key?
System Settings > Keyboard Layout > [your layout] > Options > Capslock key behavior = Caps Lock is disabled
External USB keyboard
The xmodmap trick doesn't work whe the computer resumes from suspend. So we have to execute xmodmap on resume.
#!/bin/bash . /usr/lib/pm-utils/functions case "$1" in hibernate|suspend) ;; thaw|resume) xmodmap $HOME/.Xmodmap ;; *) ;; esac exit
Finally make is executable:
sudo chmod 755 /etc/pm/sleep.d/50-xmodmap.sh
Keine Kommentare:
Kommentar veröffentlichen