forked from pool/console-setup
- Add patch to fix Caps_Lock mapping for us.map and others (bsc#1202853): * 0001-ckbcomp-Fix-check-for-non-ascii.patch OBS-URL: https://build.opensuse.org/request/show/1042310 OBS-URL: https://build.opensuse.org/package/show/Base:System/console-setup?expand=0&rev=13
35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
From c73920250a124b9c6a73ed7211af74df993d449b Mon Sep 17 00:00:00 2001
|
|
From: Fabian Vogt <fvogt@suse.de>
|
|
Date: Mon, 12 Dec 2022 09:54:11 +0100
|
|
Subject: [PATCH] ckbcomp: Fix check for non-ascii
|
|
|
|
It did a string comparision with "127" (0x7f converted to string) which is
|
|
true also for characters below 100, like '1' (51) or 'Q' (81) because the
|
|
first letter of the string representation of their ASCII value is > '1'.
|
|
|
|
This bug meant that even maps which didn't need it had $broken_caps = 1,
|
|
leading to Caps_Lock getting replaced by CtrlL_Lock. With this patch, maps
|
|
like 'us' use Caps_Lock again.
|
|
|
|
Signed-off-by: Fabian Vogt <fvogt@suse.de>
|
|
---
|
|
Keyboard/ckbcomp | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/Keyboard/ckbcomp b/Keyboard/ckbcomp
|
|
index adbcd79..6108fff 100755
|
|
--- a/Keyboard/ckbcomp
|
|
+++ b/Keyboard/ckbcomp
|
|
@@ -4376,7 +4376,7 @@ sub print_vector {
|
|
my $u = ord (uc (pack ("U", $v)));
|
|
my $c = ($v == $l ? $u : $l);
|
|
$capsvector[$mask] = $1 ."U+". sprintf ("%04x", $c);
|
|
- if ($v != $c && $v gt 0x7f) {
|
|
+ if ($v != $c && $v > 0x7f) {
|
|
$broken_caps = 1;
|
|
}
|
|
}
|
|
--
|
|
2.38.1
|
|
|