From e035b968f41652a5de7cd79896172824590e6d2f Mon Sep 17 00:00:00 2001 From: Andreas Wettstein Date: Sun, 28 Oct 2012 14:05:53 +0100 Subject: [PATCH] Option to apparently unlock the Lock modifier on press of Caps Lock key. Signed-off-by: Andreas Wettstein --- rules/base.o_s.part | 1 + rules/base.xml.in | 6 ++++++ symbols/capslock | 16 ++++++++++++++++ 3 Dateien geändert, 23 Zeilen hinzugefügt(+) diff --git a/rules/base.o_s.part b/rules/base.o_s.part index b4772b4..5a1b1d8 100644 --- a/rules/base.o_s.part +++ b/rules/base.o_s.part @@ -68,6 +68,7 @@ caps:hyper = +capslock(hyper) caps:none = +capslock(none) caps:ctrl_modifier = +capslock(ctrl_modifier) + caps:unlock_early = +capslock(unlock_early) ctrl:nocaps = +ctrl(nocaps) ctrl:lctrl_meta = +ctrl(lctrl_meta) ctrl:swapcaps = +ctrl(swapcaps) diff --git a/rules/base.xml.in b/rules/base.xml.in index 712ddab..4064743 100644 --- a/rules/base.xml.in +++ b/rules/base.xml.in @@ -6121,6 +6121,12 @@ <_description>Make Caps Lock an additional Control but keep the Caps_Lock keysym + diff --git a/symbols/capslock b/symbols/capslock index 3e08805..53d5609 100644 --- a/symbols/capslock +++ b/symbols/capslock @@ -72,3 +72,19 @@ xkb_symbols "ctrl_modifier" { }; modifier_map Control { }; }; + +// For ALPHABETIC keys, apparently unlock Lock modifier when Caps Lock key is +// pressed the second time (rather than when it is released the second +// time). The Private means 'LockMods(modifiers=Shift+Lock, affect=unlock)', +// but xkbcomp does not understand this syntax yet. Note that unlock_early +// requires Xserver 1.12 and up. +partial hidden modifier_keys +xkb_symbols "unlock_early" { + key { + repeat=no, + type[group1]="ALPHABETIC", + symbols[group1]=[ Caps_Lock, Caps_Lock ], + actions[group1]=[ LockMods(modifiers=Lock), Private(type=3,data[0]=1,data[1]=3,data[2]=3) ] + }; +}; + -- 1.7.11.3