From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: bug#40273: installer: No way to input Latin characters with non-Latin keyboard layouts Date: Mon, 30 Mar 2020 19:11:13 +0200 Message-ID: <20200330171113.njx7wstlmace45xk@pelzflorian.localdomain> References: <20200328134202.rgl6usllluoo2b2y@pelzflorian.localdomain> <87a740nu0u.fsf@gmail.com> <20200330104449.ahyivwdn62g6jluw@pelzflorian.localdomain> <875zemoz26.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="qcoq6ijjbnuflpjv" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:58223) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIxxF-0001YC-H5 for bug-guix@gnu.org; Mon, 30 Mar 2020 13:12:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIxxD-00071w-4c for bug-guix@gnu.org; Mon, 30 Mar 2020 13:12:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51635) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jIxxC-00071a-Mv for bug-guix@gnu.org; Mon, 30 Mar 2020 13:12:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jIxxC-0003rB-GM for bug-guix@gnu.org; Mon, 30 Mar 2020 13:12:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <875zemoz26.fsf@gmail.com> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: Mathieu Othacehe Cc: 40273@debbugs.gnu.org --qcoq6ijjbnuflpjv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 30, 2020 at 01:35:29PM +0200, Mathieu Othacehe wrote: > In the installer, the keyboard layout is handled by KMSCON. It means > that running setxkbmap or loadkeys commands won't help. As KMSCON only > supports static keyboard layout setting at start time, I had to patch it > dirty (see kmscon-runtime-keymap-switch.patch). With this patch, it is > possible to write keyboard model, layout and variant to the file pointed > by KEYMAP_UPDATE environment variable, and have the keyboard layout > updated (see kmscon-update-keymap). > > Mathieu Thank you for the information. The attached patch to Guix enables Alt+Shift toggling of the layout (it is too hacky, and it is always QWERTY layout!). But it is possible. Regards, Florian --qcoq6ijjbnuflpjv Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="kmscon-toggle-layout.patch" diff --git a/gnu/local.mk b/gnu/local.mk index 26eb8f7b09..6c50d2d352 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1074,6 +1074,7 @@ dist_patch_DATA = \ %D%/packages/patches/kio-search-smbd-on-PATH.patch \ %D%/packages/patches/kmail-Fix-missing-link-libraries.patch \ %D%/packages/patches/kmod-module-directory.patch \ + %D%/packages/patches/kmscon-test.patch \ %D%/packages/patches/kmscon-runtime-keymap-switch.patch \ %D%/packages/patches/kpackage-allow-external-paths.patch \ %D%/packages/patches/kmplayer-aarch64.patch \ diff --git a/gnu/packages/patches/kmscon-test.patch b/gnu/packages/patches/kmscon-test.patch new file mode 100644 index 0000000000..aeeebe3c09 --- /dev/null +++ b/gnu/packages/patches/kmscon-test.patch @@ -0,0 +1,15 @@ +diff -ur a/src/uterm_input_uxkb.c b/src/uterm_input_uxkb.c +--- a/src/uterm_input_uxkb.c 1970-01-01 01:00:00.000000000 +0100 ++++ b/src/uterm_input_uxkb.c 2020-03-30 18:27:40.880000000 +0200 +@@ -215,7 +215,10 @@ + + llog_info(dev->input, "HANDLER CALLED %s|%s|%s\n", + model, layout, variant); +- uxkb_desc_init(dev->input, model, layout, variant, NULL, NULL); ++ int end_of_layout; ++ for (end_of_layout=0; layout[end_of_layout]; end_of_layout++); ++ memcpy (layout+end_of_layout, (void *)",us", 4); ++ uxkb_desc_init(dev->input, model, layout, variant, "grp:alt_shift_toggle", NULL); + + dev->state = xkb_state_new(dev->input->keymap); + if (!dev->state) { diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index 9cb004e36a..9af293ab6d 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -272,7 +272,7 @@ compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.") (base32 "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87")) (patches - (search-patches "kmscon-runtime-keymap-switch.patch")) + (search-patches "kmscon-runtime-keymap-switch.patch" "kmscon-test.patch")) (modules '((guix build utils))) (file-name (git-file-name name version)))) (build-system gnu-build-system) --qcoq6ijjbnuflpjv--