So tauschen Sie Strg und Feststelltaste mit xmodmap aus


10

Oder irgendein anderes Tool, aber ich bevorzuge xmodmap. Ich habe es versucht:

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

Ich habe es auch versucht:

xmodmap -e "keycode 66 = Control_L"

Aber keiner scheint voll zu funktionieren. Hier ist das Ereignisprotokoll zum Drücken der Feststelltaste:

KeyPress event, serial 28, synthetic NO, window 0x1a00001,
root 0x12d, subw 0x0, time 914826, (679,342), root:(680,362),
state 0x12, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XKeysymToKeycode returns keycode: 37 // 37 is the control key code
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False

Ich verwende Ubuntu 10.10 mit einem fantastischen Fenstermanager.

Antworten:


8

Von Remap Caps Lock :

man xmodmap zeigt, wie die linke Steuertaste und die CapsLock-Taste ausgetauscht werden:

!
! 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

Ähm, das ist mein erster Versuch in meinem Beitrag.
— Maruti

Oups, habe das verpasst. Warum hat es dann diesmal funktioniert?
— Harrymc

Ich bin mir nicht sicher. Ich glaube, ich habe vergessen, die Keymap zurückzusetzen, nachdem ich mich in Schlüsselcodes eingemischt habe.
— Maruti

15

Dies kann für Sie funktionieren.

/usr/bin/setxkbmap -option "ctrl:swapcaps"

Wie kann ich es durch setxbmap
— SLN

Durch die Nutzung unserer Website bestätigen Sie, dass Sie unsere Cookie-Richtlinie und Datenschutzrichtlinie gelesen und verstanden haben.
Licensed under cc by-sa 3.0 with attribution required.