summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Udaltsov <sergey.udaltsov@gmail.com>2019-05-30 00:29:18 +0100
committerSergey Udaltsov <sergey.udaltsov@gmail.com>2019-05-30 00:29:18 +0100
commit8396774ef153949a54e78330c44458311289085d (patch)
treec445202b97561e64f5aa5ecb02af177f576d015c
parent213d09cb7ac7e2b66bdc61882d8d284d2393548c (diff)
Merge request: Make <CAPS> an additional Esc, but Shift + <CAPS> behave like Caps_Lock
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/issues/153
-rw-r--r--rules/base.o_s.part1
-rw-r--r--rules/base.xml6
-rw-r--r--symbols/capslock9
3 files changed, 16 insertions, 0 deletions
diff --git a/rules/base.o_s.part b/rules/base.o_s.part
index 505f0945..fc1ce910 100644
--- a/rules/base.o_s.part
+++ b/rules/base.o_s.part
@@ -70,6 +70,7 @@
caps:shiftlock = +capslock(shiftlock)
caps:swapescape = +capslock(swapescape)
caps:escape = +capslock(escape)
+ caps:escape_shifted_capslock = +capslock(escape_shifted_capslock)
caps:backspace = +capslock(backspace)
caps:super = +capslock(super)
caps:hyper = +capslock(hyper)
diff --git a/rules/base.xml b/rules/base.xml
index 466e7f90..5cd3670b 100644
--- a/rules/base.xml
+++ b/rules/base.xml
@@ -6826,6 +6826,12 @@
</option>
<option>
<configItem>
+ <name>caps:escape_shifted_capslock</name>
+ <description>Make unmodified Caps Lock an additional Esc, but Shift + Caps Lock behaves like regular Caps Lock</description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
<name>caps:backspace</name>
<description>Make Caps Lock an additional Backspace</description>
</configItem>
diff --git a/symbols/capslock b/symbols/capslock
index 6b85c3d3..a082b75c 100644
--- a/symbols/capslock
+++ b/symbols/capslock
@@ -35,6 +35,15 @@ xkb_symbols "escape" {
};
hidden partial modifier_keys
+xkb_symbols "escape_shifted_capslock" {
+ key <CAPS> {
+ type[Group1] = "TWO_LEVEL",
+ symbols[Group1] = [ Escape, Caps_Lock ],
+ actions[Group1] = [ NoAction(), LockMods(modifiers = Lock) ]
+ };
+};
+
+hidden partial modifier_keys
xkb_symbols "backspace" {
key <CAPS> { [ BackSpace ] };
};