Backport upstream MR to allow Apple MacBook keyboards to type \ properly

This commit is contained in:
Davide Cavalca 2022-11-26 14:27:52 -08:00
parent 333bcc42d5
commit 4470fd9a5f
2 changed files with 79 additions and 1 deletions

72
447.patch Normal file
View File

@ -0,0 +1,72 @@
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

View File

@ -7,7 +7,7 @@
Summary: X Keyboard Extension configuration data
Name: xkeyboard-config
Version: 2.36
Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
License: MIT
URL: http://www.freedesktop.org/wiki/Software/XKeyboardConfig
@ -23,6 +23,9 @@ Source0: http://xorg.freedesktop.org/archive/individual/data/%{name}/%{name}-
Patch01: 0001-rules-use-backslashes-instead-of-slashes-for-line-co.patch
Patch02: 0002-rules-remove-two-rules-that-reference-two-sections-t.patch
# Add apple:jp_oadg109a and apple:jp_pc106 variants
Patch03: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/447.patch
BuildArch: noarch
BuildRequires: gettext gettext-devel
@ -82,6 +85,9 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/X11/xkb/compiled
%{_datadir}/pkgconfig/xkeyboard-config.pc
%changelog
* Sat Nov 26 2022 Davide Cavalca <dcavalca@fedoraproject.org> - 2.36-3
- Backport upstream MR to allow Apple MacBook keyboards to type \ properly
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.36-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild