Modify keyboard: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Claas (Diskussion | Beiträge) (More) |
Claas (Diskussion | Beiträge) (→Example modification: FOUR_LEVEL_SEMIALPHABETIC) |
||
(8 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 3: | Zeile 3: | ||
First, export your keyboard configurations to a file: | First, export your keyboard configurations to a file: | ||
$ xkbcomp -xkb $DISPLAY xkbmap | $ xkbcomp -xkb $DISPLAY xkbmap | ||
Modify file xkbmap. | Modify file xkbmap. | ||
Zeile 9: | Zeile 9: | ||
Save and reload keyboard configurations: | Save and reload keyboard configurations: | ||
$ xkbcomp -w 0 xkbmap $DISPLAY | $ xkbcomp -w 0 xkbmap $DISPLAY | ||
So far no root access is required. | So far no root access is required. | ||
== For automatic loading at login? [NOT WORKING?] == | |||
$ cp /etc/X11/xinit/xinitrc .xinitrc | |||
$ chmod 755 .xinitrc | |||
Add the following to .xinitrc | |||
# CB | |||
test -f ~/bin/xkbmap && xkbcomp -w 0 ~/bin/xkbmap $DISPLAY | |||
# Disable 'popup'-key | |||
xmodmap -e 'keycode 135=' | |||
== Save compiled keymap to file == | == Save compiled keymap to file == | ||
$ xkbcomp -w 0 xkbmap -o xkbmap.xkm | $ xkbcomp -w 0 xkbmap -o xkbmap.xkm | ||
== Disable particular key == | |||
$ xmodmap -e 'keycode 135=' | |||
This example disables key with keycode 135. For determining keycode use `xev -event keyboard`. | |||
== Links == | |||
* [https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg Keyboard configuration in Xorg] | |||
* [https://superuser.com/questions/775785/how-to-disable-a-keyboard-key-in-linux-ubuntu How to disable a keyboard key] | |||
== Example modification == | == Example modification == | ||
type="FOUR_LEVEL_SEMIALPHABETIC" ensures that AltGR+key works even if ShiftLock is active. | |||
key <AD02> { | |||
type= "FOUR_LEVEL_SEMIALPHABETIC", | |||
symbols[Group1]= [ w, W, asciitilde, Lstroke ] | |||
}; | |||
... | |||
key <AC01> { | key <AC01> { | ||
type= " | type= "FOUR_LEVEL_SEMIALPHABETIC", | ||
symbols[Group1]= [ a, A, braceleft, AE ] | symbols[Group1]= [ a, A, braceleft, AE ] | ||
}; | }; | ||
Zeile 29: | Zeile 56: | ||
}; | }; | ||
key <AC03> { | key <AC03> { | ||
type= " | type= "FOUR_LEVEL_SEMIALPHABETIC", | ||
symbols[Group1]= [ d, D, bracketright, ETH ] | symbols[Group1]= [ d, D, bracketright, ETH ] | ||
}; | }; | ||
Zeile 37: | Zeile 64: | ||
}; | }; | ||
key <AC05> { | key <AC05> { | ||
type= " | type= "FOUR_LEVEL_SEMIALPHABETIC", | ||
symbols[Group1]= [ g, G, backslash, ENG ] | symbols[Group1]= [ g, G, backslash, ENG ] | ||
}; | }; |
Aktuelle Version vom 18. Juli 2023, 14:59 Uhr
Manual way, remains until reboot
First, export your keyboard configurations to a file:
$ xkbcomp -xkb $DISPLAY xkbmap
Modify file xkbmap.
Save and reload keyboard configurations:
$ xkbcomp -w 0 xkbmap $DISPLAY
So far no root access is required.
For automatic loading at login? [NOT WORKING?]
$ cp /etc/X11/xinit/xinitrc .xinitrc $ chmod 755 .xinitrc
Add the following to .xinitrc
# CB test -f ~/bin/xkbmap && xkbcomp -w 0 ~/bin/xkbmap $DISPLAY # Disable 'popup'-key xmodmap -e 'keycode 135='
Save compiled keymap to file
$ xkbcomp -w 0 xkbmap -o xkbmap.xkm
Disable particular key
$ xmodmap -e 'keycode 135='
This example disables key with keycode 135. For determining keycode use `xev -event keyboard`.
Links
Example modification
type="FOUR_LEVEL_SEMIALPHABETIC" ensures that AltGR+key works even if ShiftLock is active.
key <AD02> { type= "FOUR_LEVEL_SEMIALPHABETIC", symbols[Group1]= [ w, W, asciitilde, Lstroke ] }; ... key <AC01> { type= "FOUR_LEVEL_SEMIALPHABETIC", symbols[Group1]= [ a, A, braceleft, AE ] }; key <AC02> { type= "FOUR_LEVEL_SEMIALPHABETIC", symbols[Group1]= [ s, S, bracketleft, U1E9E ] }; key <AC03> { type= "FOUR_LEVEL_SEMIALPHABETIC", symbols[Group1]= [ d, D, bracketright, ETH ] }; key <AC04> { type= "FOUR_LEVEL_SEMIALPHABETIC", symbols[Group1]= [ f, F, braceright, ordfeminine ] }; key <AC05> { type= "FOUR_LEVEL_SEMIALPHABETIC", symbols[Group1]= [ g, G, backslash, ENG ] };