All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Luc Van Rompaey <luc.vanrompaey@gmail.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH 0/4] Implement the 'setkey' command to allow changing the keyboard map
Date: Sun, 12 Jul 2015 13:03:30 +0300	[thread overview]
Message-ID: <20150712130330.0ba74e02@opensuse.site> (raw)
In-Reply-To: <1436639304-5365-1-git-send-email-luc.vanrompaey@gmail.com>

В Sat, 11 Jul 2015 20:28:20 +0200
Luc Van Rompaey <luc.vanrompaey@gmail.com> пишет:

> 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 problematic,
> in that it easily causes hangups.
> 

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_keyboard'
> input terminal, and in what time frame, remains to be seen.
> 
> This patch set reintroduces a 'setkey' command, to support changing the keyboard
> map, similarly to what was possible under Legacy GRUB.
> 

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.
> 

You already sent this one, it hardly belongs to this patch series.

> The second patch implements the 'nusetkey' module, which provides the 'setkey'
> command. In addition, it provides a 'setnumpad' command, to change the
> behavior of the numeric keypad.
>

Why NumLock is not sufficient? 
 
> The third patch implements the 'nuconsole' input terminal, which works in
> conjunction with the 'nusetkey' module to support keyboard map changes.
> 

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' and
> 'setnumpad' commands implemented by the 'nusetkey' module.
> 
> 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
> 
>  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
> 



  parent reply	other threads:[~2015-07-12 10:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-11 18:28 [PATCH 0/4] Implement the 'setkey' command to allow changing the keyboard map Luc Van Rompaey
2015-07-11 18:28 ` [PATCH 1/4] update URL to bios_data_area.html on comment line Luc Van Rompaey
2015-07-11 18:28 ` [PATCH 2/4] implement the nusetkey module Luc Van Rompaey
2015-07-11 18:28 ` [PATCH 3/4] implement the nuconsole input terminal Luc Van Rompaey
2015-07-11 18:28 ` [PATCH 4/4] add documentation for keymap, setkey, and setnumpad commands Luc Van Rompaey
2015-07-12 10:03 ` Andrei Borzenkov [this message]
2015-07-12 12:25   ` [PATCH 0/4] Implement the 'setkey' command to allow changing the keyboard map Luc Van Rompaey
2015-07-14 17:25     ` Luc Van Rompaey
2015-07-14 19:00       ` Vladimir 'phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150712130330.0ba74e02@opensuse.site \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=luc.vanrompaey@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.