5

I've tried to piece together how to do this from various sources. First approach, based on 1 and 2:

$ grep ^HOOKS /etc/mkinitcpio.conf
HOOKS="base udev autodetect modconf block lvm2 keyboard keymap encrypt filesystems fsck"
$ grep ^KEYMAP /etc/vconsole.conf
KEYMAP=dvorak

Then run sudo mkinitcpio -p linux successfully and reboot. Result: the password prompt still uses the US layout.


Second approach, based on 3:

  1. Install ckbcomp
  2. Run:

    sudo mkdir /boot/grub/layout
    sudo grub-kbdcomp -o /boot/grub/layout/us-dvorak-alt-intl.gkb us dvorak-alt-intl
    

    (ignored "Unknown keyboard scan code 0x…" warnings)

  3. In /etc/default/grub set GRUB_TERMINAL_INPUT=at_keyboard
  4. In /etc/grub.d/40_custom add:

    insmod keylayouts
    keymap /boot/grub/layout/us-dvorak-alt-intl.gkb
    
  5. Run:

    sudo grub-mkconfig -o /boot/grub/grub.cfg
    sudo grub-install --target=i386-pc /dev/sda
    reboot
    

Now I can use Dvorak in the GRUB menu, but not on the LUKS prompt.


Other sources mention a similar approach which I don't think can work because the LUKS prompt shows up before the relevant files can even be read. Finally, one source says this can't be done at all.

5
  • 2
  • @frostschutz Yeah, that would work. Shame if it's the only way though. Do you want to post it as an answer? – l0b0 Mar 11 '17 at 10:50
  • It's not an answer to your question (you might want Dvorak in grub anyway for the grub shell and whatnot) but it should be a viable workaround for everything else (including livecd/rescue, you just have to make do with US layout in many cases). – frostschutz Mar 11 '17 at 10:57
  • I'd still upvote it - it solves the problem even though it's not the preferred method. – l0b0 Mar 11 '17 at 14:21
  • It is possible, I'd been doing it for some time now. I recently got a hardware-programmable keyboard and needed to change it back to qwerty so the kb itself can be dvorak instead. I found this question since I couldn't remember what I did.. I'm not making an answer since I dont know which of these changes worked, but basically it was either as simple as localectl set-keymap <YOUR KEYMAP>, or adding (or in my case, removing) rd.vconsole.keymap=<YOUR KEYMAP LOCALE from /etc/default/grub @ GRUB_CMDLINE_LINUX=" along with a grub2-mkconfig. It's not impossible both of these are needed..gl – Hashbrown Oct 25 '18 at 5:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.