xkeyboard-config/447.patch

73 lines
2.4 KiB
Diff

From 2433ef1aaa77b7911917b696918f2981ed5aa7ba Mon Sep 17 00:00:00 2001
From: Daniel Stone <daniels@collabora.com>
Date: Thu, 17 Mar 2022 15:14:49 -0400
Subject: [PATCH] Add apple:jp_oadg109a and apple:jp_pc106 variants
These variants allow Apple MacBook keyboards to type \ properly.
Co-authored-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
---
rules/0042-o_s.part | 2 ++
rules/base.xml | 12 ++++++++++++
symbols/macintosh_vndr/apple | 10 ++++++++++
3 files changed, 24 insertions(+)
diff --git a/rules/0042-o_s.part b/rules/0042-o_s.part
index 5fa7849a..75bf7730 100644
--- a/rules/0042-o_s.part
+++ b/rules/0042-o_s.part
@@ -159,6 +159,8 @@
terminate:ctrl_alt_bksp = +terminate(ctrl_alt_bksp)
keypad:pointerkeys = +keypad(pointerkeys)
apple:alupckeys = +macintosh_vndr/apple(alupckeys)
+ apple:jp_pc106 = +macintosh_vndr/apple(jp_pc106)
+ apple:jp_oadg109a = +macintosh_vndr/apple(jp_oadg109a)
shift:both_capslock = +shift(both_capslock)
shift:lshift_both_capslock = +shift(lshift_both_capslock)
shift:rshift_both_capslock = +shift(rshift_both_capslock)
diff --git a/rules/base.xml b/rules/base.xml
index eff2f941..75195b64 100644
--- a/rules/base.xml
+++ b/rules/base.xml
@@ -7833,6 +7833,18 @@
<description>Apple Aluminium emulates Pause, PrtSc, Scroll Lock</description>
</configItem>
</option>
+ <option>
+ <configItem>
+ <name>apple:jp_oadg109a</name>
+ <description>Japanese Apple keyboards emulate OADG109A backslash</description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
+ <name>apple:jp_pc106</name>
+ <description>Japanese Apple keyboards emulate PC106 backslash</description>
+ </configItem>
+ </option>
<option>
<configItem>
<name>shift:breaks_caps</name>
diff --git a/symbols/macintosh_vndr/apple b/symbols/macintosh_vndr/apple
index 342eb7db..f74a71fd 100644
--- a/symbols/macintosh_vndr/apple
+++ b/symbols/macintosh_vndr/apple
@@ -139,3 +139,13 @@ xkb_symbols "alupckeys" {
};
override key <NMLK> { [ Num_Lock, Pointer_EnableKeys ] };
};
+
+partial
+xkb_symbols "jp_oadg109a" {
+ replace key <AB11> { [ backslash, underscore ] };
+};
+
+partial
+xkb_symbols "jp_pc106" {
+ replace key <AB11> { [ backslash, bar ] };
+};
--
GitLab