URL: <https://savannah.gnu.org/bugs/?60727>
Summary: Input lost after switching terminal_input to at_keyboard (can't switch to dvorak layout) Project: GNU GRUB Submitted by: bircoph Submitted on: Fri 04 Jun 2021 11:03:19 AM UTC Category: Terminal Severity: Major Priority: 5 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Originator Name: Originator Email: Open/Closed: Open Release: Release: other Discussion Lock: Any Reproducibility: Every Time Planned Release: None _______________________________________________________ Details: Hi! I use grub-2.06_rc1 on Gentoo ~x86. My hardware is AT keyboard (AT Translated Set 2 keyboard built-in in my laptop). This is important, because there are very similar bugs that were closed because reporters used usb keyboard: bug #51129 bug #50232 I want to use dvorak layout. In order to do this I use the following in my grub config: insmod keylayouts keymap /boot/grub/dvorak.gkb terminal_input at_keyboard It should work, but it doesn't. (dvorak.gkb is generated using grub-mklayout) I tried outb magic from Debian bug 741464: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741464 mentioned in bug #50232: terminal_input at_keyboard ; outb 0x64 0x60 ; outb 0x60 0x40 0x40 and this one: terminal_input at_keyboard ; outb 0x64 0x60 ; outb 0x60 0x64 Both don't help, neither in config nor in interactive run-time grub shell. With grub-2 I always had problem with switching to dvorak layout, but with 2.04-r1 the following hack worked: insmod terminal insmod at_keyboard terminal_input console terminal_output console insmod keylayouts keymap /boot/grub/dvorak.gkb # the last line in config after all menu entries terminal_input --append at_keyboard It is importand that at_keyboard was added after all menu entries. Have no idea why. This workaround no longer works in 2.06_rc1, but it gave me an insight what to try. If I switch to the grub run-time built-in shell and try to append at_keyboard first and remove console later, it works. So, if I have the following in the config (or enter interactively): insmod keylayouts keymap /boot/grub/dvorak.gkb and then enter interactively in the grub run-time shell: terminal_input --append at_keyboard terminal_input --remove console Then I can finally use the dvorak layout. It looks like a bug to me that terminal_input at_keyboard doesn't work (it leads to lost input at all), but: terminal_input --append at_keyboard terminal_input --remove console works. They should do the same, but they are not. Without '--remove console' it appears that both drivers are active and both try to process input, which leads to broken input. E.g. if I press and hold 's' qwerty key which means 'o' in dvorak layout, I have an input line like this one: oooooosoooossoooooooosooooooooooooooossoooooooosoooooosooooooooooooooooossoooooooooosoooosoooo This makes input unusable, especially for passwords where no visible input correction is possible. Furthermore the workaround above does *not* work if put in the grub config file. I have no idea why. I tried to add a sleep between these 2 commands in the config file, because there is 1-2 seconds delay at runtime when I run 'terminal_input --append at_keyboard': terminal_input --append at_keyboard sleep --verbose 5 terminal_input --remove console but this doesn't help. However, I see that the sleep happens before menu is shown even if I put the snippet shown above in the end of the config file. Please fix switching to at_keyboard so that dvorak users may enjoy their favorite layout. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?60727> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/