[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix keyboard layouts other than us

From: Vladimir 'phcoder' Serbinenko
Subject: Re: Fix keyboard layouts other than us
Date: Sun, 31 Jul 2022 14:06:46 +0200

Le dim. 31 juil. 2022, 12:41, Fabio Pugliese Ornellas <> a écrit :
Hi there,

I've been trying to set up my grub for my Dvorak keyboard. It seems
that everywhere I look points to something like:

insmod keylayouts
keymap /boot/grub/bepo.gkb

In practice however, this does NOT work at all.

After some debugging, here's what I've found:

- grub-core/commands/keylayouts.c has grub_term_map_key() which does
the actual mapping.
- This function is only referred by
  - grub-core/term/at_keyboard.c (via ps2.c)
  - grub-core/term/usb_keyboard.c

In my case, at GRUB command prompt, terminal_input tells:

- Current terminal is console.
- Neither at_keyboard nor usb_keyboard are available.

So no wonder the keymap does not work...

I drafted the attached patch to grub-core/term/efi/console.c and
grub-core/i386/pc/console.c, which should make use of
grub_term_map_key() and fix the problem. I unfortunately can't test it
because of this Ubuntu build issue
... separate issue though.

Anyhow, any advice on whether this patch would / would not work?

It seems reasonable to me that keyboard mapping should happen at
grub-core/kern/term.c at grub_getkey_noblock() instead though, as
fixing it there (immediately after term->getkey (term) call), in
theory, would fix things for all cases.

Mostly doesn't work. Firmware services and (even more) serial terminal lack information like Right Alt press and 102nd key. Without them many layouts are unusable


Fabio Pugliese Ornellas
Grub-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]