grub-devel
[Top][All Lists]
Advanced

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

Re: Fix keyboard layouts other than us


From: Fabio Pugliese Ornellas
Subject: Re: Fix keyboard layouts other than us
Date: Wed, 3 Aug 2022 09:32:57 +0100

Vladmir, not sure I get your point. Eg: I use Dvorak, which merely
requires translation of "regular" keys. For this case (and many other
similar layouts), the patch I suggested simply applies translation on
TOP of whatever the console driver gave back. If you check for USB
keyboard drivers for example, there's already code that should be able
to handle keyboard mapping in place.

Wouldn't it make sense to push for keyboard layout for console driver,
even if it means that a subset of keyboard layouts would work? It
certainly would beat 100% of non-us keyboards not working :-P

Fabio Pugliese Ornellas

On Sun, Jul 31, 2022 at 1:07 PM Vladimir 'phcoder' Serbinenko
<phcoder@gmail.com> wrote:
>
>
>
> Le dim. 31 juil. 2022, 12:41, Fabio Pugliese Ornellas 
> <fabio.ornellas@gmail.com> 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
>> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1914953/comments/7
>> ... 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.
>>
>> WDYT?
>
> 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
>>
>>
>> Thanks.
>>
>> Fabio Pugliese Ornellas
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel



reply via email to

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