summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Aruga <jun.aruga@gmail.com>2021-12-28 14:20:01 +0100
committerSergey Udaltsov <sergey.udaltsov@gmail.com>2021-12-29 16:17:41 +0000
commit8018e2982d1067fc79195e518546fee191b63b6d (patch)
treee7aa4264a45701f839bab429e6917c7920598959
parent0554e6c220555d1ed94b5ae6253226516faae951 (diff)
Adding the option to make Caps as Escape key, Shift + Caps as Compose key.
Adding the option to make Caps Lock act as Escape key, and Shift + Caps Lock act as Compose key. Signed-off-by: Jun Aruga <jun.aruga@gmail.com>
-rw-r--r--rules/0042-o_s.part1
-rw-r--r--rules/base.extras.xml15
-rw-r--r--symbols/capslock9
3 files changed, 25 insertions, 0 deletions
diff --git a/rules/0042-o_s.part b/rules/0042-o_s.part
index 647cf76d..b5605ab8 100644
--- a/rules/0042-o_s.part
+++ b/rules/0042-o_s.part
@@ -75,6 +75,7 @@
caps:swapescape = +capslock(swapescape)
caps:escape = +capslock(escape)
caps:escape_shifted_capslock = +capslock(escape_shifted_capslock)
+ caps:escape_shifted_compose = +capslock(escape_shifted_compose)
caps:backspace = +capslock(backspace)
caps:super = +capslock(super)
caps:hyper = +capslock(hyper)
diff --git a/rules/base.extras.xml b/rules/base.extras.xml
index 82aa2c19..2ac0fd90 100644
--- a/rules/base.extras.xml
+++ b/rules/base.extras.xml
@@ -1437,6 +1437,21 @@
</configItem>
</option>
</group>
+ <group allowMultipleSelection="false">
+ <!-- Caps Lock tweaks.
+ "Internal" capitalization means capitalization using some internal tables.
+ Otherwise "as Shift" - means using next group. -->
+ <configItem popularity="exotic">
+ <name>caps</name>
+ <description>Caps Lock behavior</description>
+ </configItem>
+ <option>
+ <configItem popularity="exotic">
+ <name>caps:escape_shifted_compose</name>
+ <description>Make Caps Lock an additional Esc, and Shift + Caps Lock is the Compose</description>
+ </configItem>
+ </option>
+ </group>
<group allowMultipleSelection="true">
<!-- Tweaking the position of the "(" and ")" keys -->
<configItem popularity="exotic">
diff --git a/symbols/capslock b/symbols/capslock
index a082b75c..1c3294f9 100644
--- a/symbols/capslock
+++ b/symbols/capslock
@@ -44,6 +44,15 @@ xkb_symbols "escape_shifted_capslock" {
};
hidden partial modifier_keys
+xkb_symbols "escape_shifted_compose" {
+ key <CAPS> {
+ type[Group1] = "TWO_LEVEL",
+ symbols[Group1] = [ Escape, Multi_key ],
+ actions[Group1] = [ NoAction(), NoAction() ]
+ };
+};
+
+hidden partial modifier_keys
xkb_symbols "backspace" {
key <CAPS> { [ BackSpace ] };
};