Package: console-setup
Version: 1.201
Tags: patch

The ckbcomp command emits unicode symbols greater than 0xf000 in
keymaps, even if the linux kernel does not support those. This prevents
the fr-bepo_afnor keymap from working (see bug #968195).

The attached patch fixes ckbcomp so that it can generate proper keymaps.

Regards,

Anisse
>From ae2924d6d00460960b9c56954388d573521b71c8 Mon Sep 17 00:00:00 2001
From: Anisse Astier <ani...@astier.eu>
Date: Wed, 3 Mar 2021 18:06:49 +0100
Subject: [PATCH] ckbcomp: fix fr-bepo_afnor conversion by skipping unsupported
 symbols

Some X keymaps, including fr bepo_afnor use unicode symbols greater than
0xf000; for example the copy left symbol U+1f12f.

These values aren't supported by the linux kernel, so loadkeys won't be
able to load them, or even parse the value.

Skip those symbols to generate valid keymaps.

Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968195
Signed-off-by: Anisse Astier <ani...@astier.eu>
---
 Keyboard/ckbcomp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Keyboard/ckbcomp b/Keyboard/ckbcomp
index e638a24..c3003e6 100755
--- a/Keyboard/ckbcomp
+++ b/Keyboard/ckbcomp
@@ -3815,6 +3815,9 @@ sub uni_to_legacy {
 	    return $voidsymbol;
 	}
     } else {
+        if ($uni >= 0xf000) { # Linux limitation
+            return $voidsymbol;
+        }
 	return 'U+'. sprintf ("%04x", $uni);
     }
 }
-- 
2.29.2

Reply via email to