====== Shift Lock / Caps Lock ====== ===== Capslock deakivieren unter Ubuntu ===== Geht jetzt ganz einfach über die Systemeinstellungen->Tastatur! Quelle((http://www.ubuntugeek.com/disable-and-enable-caps-lock-in-ubuntu.html)) funktioniert! ==== Solution 1 ==== If you want to disable Caps Lock in Ubuntu you need to type the following command in your terminal xmodmap -e “clear Lock” If you want to Enable Caps Lock in Ubuntu you need to type the following command in your terminal xmodmap -e “add Lock = Caps_Lock” ==== Solution 2 ==== 1) create an appropriate xmodmap-file xmodmap -pke > ~/.xmodmap.myown 2) Search the line with capslock in it, it’s keycode 66 in my case. Replace it with something you wouls like, my line looks like this keycode 66 = slash backslash so You need to slash and backslash on your capslock. 3) make two entries for the xmodmap in [[http://wiki.ubuntuusers.de/Autostart|autostart]] xmodmap -e “clear Lock” xmodmap ~/.xmodmap.myown with the first command, the capslock function is disabled, with the second the modified keymap is loaded. ===== Capslock deakivieren ==== Quelle((http://wapedia.mobi/de/Umschaltsperre?t=3.)) Unter dem Betriebssystem GNU/Linux kann man die Caps-Lock Taste abschalten, um so ein versehentliches Betätigen zu vermeiden. Um die Caps-Lock-Taste innerhalb der grafischen Oberfläche X-Window temporär zu deaktivieren, muss folgender Befehl in der Shell eingegeben werden: $ xmodmap -e "clear Lock" Eine dauerhafte Deaktivierung erwirkt folgender Eintrag in der Datei /etc/X11/Xmodmap (systemweit) oder ~/.Xmodmap (auf Benutzerbasis): clear Lock Alternativ kann die Taste auch mit einer anderen Funktion belegt werden. Außerdem kann Caps-Lock in Shift-Lock umgewandelt werden (Schreibmaschinen-Verhalten, Umschalttaste entriegelt Feststelltaste) mit folgendem Eintrag in /etc/X11/xorg.conf: Option "XkbOptions" "caps:shiftlock" Das entspricht in etwa der Einstellung in Windows: „Deaktivierung der Feststelltaste“ durch „Umschalttaste drücken“. Durch Veränderungen in dieser Zeile lassen sich auch andere Verhaltensweisen der Umschaltsperre ändern, für Näheres siehe: [[http://freedesktop.org/wiki/Software/XKeyboardConfig/]] Quelle((http://blog.256bit.org/archives/543-Caps-Lock-unter-Windows-und-Linux-umdefinieren.html)) ===== CAPS LOCK UNTER WINDOWS UND LINUX UMDEFINIEREN ===== ===== COMPOSE KEY MITTELS XMODMAP ===== Unter einem unixoidem Betriebssystem kann man Capslock für den X-Server entweder mittels xmodmap umbiegen oder mittels der XKBD-Extensions des X-Servers. Mittels xmodmap kann man so z.B. aus einer Caps-Lock Taste eine Compose-Key Taste machen: ~$ cat <>~/.xmodmap clear Lock ! keycode über xset ablesen keycode 115 = Multi_key EOF ~$ xmode ~/.xmodmap Nun kann man mittels Compose_key o c das allseits beliebte Copyright Zeichen © erzeugen. Den Keycode erfährt man dabei mit xset. ==== COMPOSE KEY MITTELS XKB-EXTENSION ==== Selbiges kann man auch mittels der xkb-Extensions des X-Servers einstellen. Der Compose Key wird dabei in der Konfigurationsdatei des X-Servers /etc/X11/xorg.conf in der Section InputDevice definiert: ~$ cat /etc/X11/xorg.conf [...] Section "InputDevice" Identifier "Keyboard1" Driver "kbd" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "de" Option "XkbVariant" "nodeadkeys" Option "XkbOptions" "compose:caps" EndSection [...] Nach einem Neustart des X-Servers sollte dabei Compose auf der CapsLock Taste liegen. ==== COMPOSE KEY AUF DER KONSOLE ==== Für die reine Textkonsole muß man mit den keycodes rumhantieren. Showkey zeigt einem dabei freundlicherweise den Keycode der Taste an. Hier ist keycode 125 = Caps Lock. Nun kann man eine eigene Map erzeugen, in dem man zum Beispiel die vorhandene unter /usr/share/keymaps/i386/de-latin1.kmap.gz die Zeile keycode 125 = Compose hinzufügt (Backup vorher nicht vergessen!). Man kann sich auch die Mechanismen von console-tools bzw. kbd zu Nutze machen. Beide Tools ermöglichen es einem, Keys zu remappen. Dies geschieht über /etc/kbd/remap bzw. /etc/console-tools/remap. Dabei handelt es sich um ein simples Sed-Script, dass die Ausgabe von dumpkeys ausgewertet wird und dann wieder an loadkeys übergeben wird. So kann man z.B. Caps Lock folgendermaßen auf Control umbiegen: s/keycode 58 = Caps_Lock/keycode 58 = Control/; Möchte man etwas hinzufügen (z.B. ein die Belegung der Compose-Taste) so fügt man die folgende Zeile hinzu: $a\ keycode 125 = Compose Das heißt, dass am Ende der Ausgabe der Ausdruck "keycode 125 = Compose" hinzugefügt wird. Sed ist aber ein anderes Thema. Dazu mehr ein anderes Mal. Danach das entsprechende Script in /etc/init.d restarten (der Name hängt davon ab, ob kbd oder console-tools genutzt wurde, wahrscheinlich irgendwas wie *console*) und man kann mit compose ae æ erzeugen. ---- Quelle((http://c2.com/cgi/wiki?RemapCapsLock)) ==== Unix, Console ==== If you have loadkeys (as you would under Linux), this should do the trick: loadkeys /usr/share/keymaps/i386/qwerty/emacs2.kmap.gz To reset to the defaults (you may have to switch to another tty and back to undo ctrl-lock): loadkeys -d ==== Unix, X ==== Under Redhat 8.0, just enable the following line in /etc/X11/XF86Config Option "XkbOptions" "ctrl:swapcaps" Replace "swapcaps" with "nocaps" to turn both keys into "Control." With X, there are at least 2 different ways to remap the keys. One is using xmodmap. For example, man xmodmap shows how to swap the left control key and the CapsLock key: ! ! Swap Caps_Lock and Control_L ! remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L Many people don't want a CapsLock key at all. They can change the CapsLock key to a ControlKey? by using the following lines in xmodmap: clear Lock keycode 0x7e = Control_R add Control = Control_R Maybe you have to change the keycode 0x7e. You can find the keycodes with xev. I Furthermore, this only works if you don't have a right control key. I hope somebody has a solution which does not have this restriction. This solution might be the easiest one. If you do not have a problem owning a dead key in your keyboard you might disable CapsLock at all: "remove lock = Caps_Lock" (or just: "clear lock") A better solution might be this sequence, which is keycode independent and does not remove existing control keys: remove Lock = Caps_Lock remove Control = Control_L keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L Now, you can use another solution which uses xkb. For that, you will have to find the sybols directory on your unix system. There, you add a file which might be called 'ctrl' containing the following: // eliminate the caps lock key completely (replace with control) partial modifier_keys xkb_symbols "nocaps" { key { symbols[Group1]= [ Control_L ] }; modifier_map Control { , }; }; This eliminates the caps lock key if included in a keymap. We can do this by changing the file en_US: xkb_symbols "pc101" { include "ctrl(nocaps)" key { [ Mode_switch, Multi_key ] }; augment "us(pc101)" include "iso9995-3(basic101)" modifier_map Mod3 { Mode_switch }; }; You can then add the keyboard using a line like: /usr/X11R6/lib/X11/xkb/xkbcomp -w 1 -R/usr/X11R6/lib/X11/xkb -xkm -m en_US keymap/xfree86 0:0 Now, unfortunately there are probably errors in the text above. Please correct and make it working for other systems than RedHat Linux. From WhyNotUseEmacs: Add the following to your Xmodmap (on many linuxes the default Xmodmap is located at /etc/X11/Xmodmap): clear lock add control = Caps_Lock You can activate this in a already-running X using xmodmap /etc/X11/Xmodmap # or whatever the name of your modmap file is. This will turn your caps lock into a control key. You won't have a caps lock key anymore, so make sure caps lock is off when you do this. ;) -- KevinStone? If you get stuck and find yourself without a control key use xev to find the keycode of your control and caps lock keys. Then use the following to restore the default config. remove Lock = Caps_Lock remove Control = Control_L keycode = Control_L keycode = Caps_Lock add Lock = Caps_Lock add Control = Control_L ==== Additional shortcut key ==== It is also possible to make the Caps_Lock a handy additional shourcut modifier, ie.: remove Lock = Caps_Lock keysym Caps_Lock = Meta_L