Drücken Sie lange die Eingabetaste als Strg-Taste

Drücken Sie lange die Eingabetaste als Strg-Taste

Ich bin ein Emacs-Benutzer und möchte die Taste „Lange gedrückt halten“ als zusätzliche Steuerungstaste haben. Ich habe das unter Mac OS mit KeyboardRemap4Macbook gemacht. Ich konnte aber nicht herausfinden, wie das in Ubuntu Unity funktioniert. Das würde meinen linken Finger sehr schonen :)

Antwort1

Dies wurde durch die Verwendung von xcape ( sudo apt-get install xcapeoder von github -https://github.com/alols/xcape)

und folgen Sie dem Skript in der README-Datei:

# Map an unused modifier's keysym to the spacebar's keycode and make it a
# control modifier. It needs to be an existing key so that emacs won't
# spazz out when you press it. Hyper_L is a good candidate.
spare_modifier="Hyper_L"
xmodmap -e "keycode 65 = $spare_modifier"
xmodmap -e "remove mod4 = $spare_modifier" # hyper_l is mod4 by default
xmodmap -e "add Control = $spare_modifier"

# Map space to an unused keycode (to keep it around for xcape to
# use).
xmodmap -e "keycode any = space"

# Finally use xcape to cause the space bar to generate a space when tapped.
xcape -e "$spare_modifier=space"

Das hat bei mir unabhängig von der Distribution funktioniert - ich habe es auch auf Fedora 23 und Debian9 zum Laufen gebracht, außer auf Ubuntu 17.04, da es eine generische Lösung ist. Danke

verwandte Informationen