[Top][All Lists]

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

Fix keyboard layouts other than us

From: Fabio Pugliese Ornellas
Subject: Fix keyboard layouts other than us
Date: Sun, 31 Jul 2022 11:39:54 +0100

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.



Fabio Pugliese Ornellas

Attachment: fix.diff
Description: Text Data

reply via email to

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