From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZEE6n-0008PY-ER for mharc-grub-devel@gnu.org; Sun, 12 Jul 2015 06:03:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEE6k-0008Ow-N0 for grub-devel@gnu.org; Sun, 12 Jul 2015 06:03:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEE6h-0002t7-Di for grub-devel@gnu.org; Sun, 12 Jul 2015 06:03:38 -0400 Received: from mail-la0-x22f.google.com ([2a00:1450:4010:c03::22f]:33532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEE6h-0002sw-4F for grub-devel@gnu.org; Sun, 12 Jul 2015 06:03:35 -0400 Received: by laar3 with SMTP id r3so287098184laa.0 for ; Sun, 12 Jul 2015 03:03:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=PONA9UJ11gCxMRclQOsc8XtK9QxZWL3AgwozzY37pQk=; b=JfWvTudalIZhrQLziHDmuDGOyhrBoNug/1jf/QRCcggfz+KMMbhb2R31oFRMAnoI3N GYWG6qKMyjlkLf7DwToJXA4kuinL0wa6R0cj0hJElSGFRtIOlgCxEOV9+fjWDSse7TK0 rUFZ55s0j/kbkLhmrv+Or9/mU0DaNcXynUpFjT7OhmqY6yfzir2nIoHRV3GsOlhWiz5Z TJ4Fc4f4va4x7T2lZ4qS5wlhHSFj+0OHPIOC7lnj4fwDlJ6e1FMtmHb3TpKjQ5sgGsVD VngCoRrDxV+qT3ccaqkmQTC6LY0Ntr9X8O3IeHshsRQDzdQS6yN1AIfrReG9u3w9m1WX tRTw== X-Received: by 10.152.19.67 with SMTP id c3mr24537384lae.4.1436695412944; Sun, 12 Jul 2015 03:03:32 -0700 (PDT) Received: from opensuse.site (ppp91-76-24-71.pppoe.mtu-net.ru. [91.76.24.71]) by smtp.gmail.com with ESMTPSA id y3sm3751797laj.8.2015.07.12.03.03.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Jul 2015 03:03:31 -0700 (PDT) Date: Sun, 12 Jul 2015 13:03:30 +0300 From: Andrei Borzenkov To: Luc Van Rompaey Subject: Re: [PATCH 0/4] Implement the 'setkey' command to allow changing the keyboard map Message-ID: <20150712130330.0ba74e02@opensuse.site> In-Reply-To: <1436639304-5365-1-git-send-email-luc.vanrompaey@gmail.com> References: <1436639304-5365-1-git-send-email-luc.vanrompaey@gmail.com> X-Mailer: Claws Mail 3.11.0 (GTK+ 2.24.28; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22f Cc: The development of GNU GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2015 10:03:39 -0000 =D0=92 Sat, 11 Jul 2015 20:28:20 +0200 Luc Van Rompaey =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Legacy GRUB had a 'setkey' command to remap the keyboard keys. > GRUB2 no longer has this command. Instead, it provides an 'at_keyboard' > input terminal module, which can load a GRUB keymap. > Unfortunately, at least on the i386-pc platform, 'at_keyboard' is problem= atic, > in that it easily causes hangups. >=20 Do you have some more data? Fixing it would be preferable. > For now, I'm unsure what needs to be done to fix 'at_keyboard', which is = why > I decided to look for a different solution. Whether I can fix the 'at_ke= yboard' > input terminal, and in what time frame, remains to be seen. >=20 > This patch set reintroduces a 'setkey' command, to support changing the k= eyboard > map, similarly to what was possible under Legacy GRUB. >=20 GRUB2 already has framework for custom keyboard layouts. Why not reuse grub_term_map_key() from keylayouts same as at_keyboard and usb_keyboard do? Map scan code to GRUB_KEYBOARD_* and let grub_term_map_key() to care about keyboard mapping. This has additional advantage of supporting localized keyboard tables (your approach does not, it only changes ASCII layouts). > The first patch just makes a simple edit to a comment line in the 'memory= .h' > header file. It updates the URL for the 'bios_data_area.html' web page, = which > contains helpful information about BIOS, and specifically, the keyboard > interface. >=20 You already sent this one, it hardly belongs to this patch series. > The second patch implements the 'nusetkey' module, which provides the 'se= tkey' > command. In addition, it provides a 'setnumpad' command, to change the > behavior of the numeric keypad. > Why NumLock is not sufficient?=20 =20 > The third patch implements the 'nuconsole' input terminal, which works in > conjunction with the 'nusetkey' module to support keyboard map changes. >=20 Making them two different modules in your case is pointless; nuconsole cannot work without nusetkey and nusetkey is used only by nuconsole. Also, something like ext_keyboard would probably be more appropriate. > Finally, the fourth patch provides updates to the GRUB manual. > It documents the 'keymap' command (which loads a keyboard map for use by > the 'at_keyboard' or 'usb_keyboard' input terminals), plus the 'setkey' a= nd > 'setnumpad' commands implemented by the 'nusetkey' module. >=20 > Luc Van Rompaey (4): > update URL to bios_data_area.html on comment line > implement the nusetkey module > implement the nuconsole input terminal > add documentation for keymap, setkey, and setnumpad commands >=20 > docs/grub.texi | 150 +++++++++ > grub-core/Makefile.core.def | 12 + > grub-core/commands/i386/pc/nusetkey.c | 583 ++++++++++++++++++++++++++++= ++++++ > grub-core/term/i386/pc/nuconsole.c | 111 +++++++ > include/grub/i386/pc/memory.h | 2 +- > include/grub/i386/pc/nusetkey.h | 25 ++ > 6 files changed, 882 insertions(+), 1 deletion(-) > create mode 100644 grub-core/commands/i386/pc/nusetkey.c > create mode 100644 grub-core/term/i386/pc/nuconsole.c > create mode 100644 include/grub/i386/pc/nusetkey.h >=20