How do I set the Dvorak keyboard layout in
cmdline.txt? What would I put for the
kbd=us flag? Dvorak is a variant of the US layout.
Setting the keyboard from
cmdline.txt probably isn't ideal, and you would be better off using
raspi-config, particularly if you use a GUI, because I believe the keyboard used there maybe configured independently of the text console, and you probably want them both the same.
That said, the parameters in
cmdline.txt are passed to kernel, and anything that's not recognized by the kernel is passed to the init system (init being the only userspace program actually started by the kernel). On current versions of Raspbian, "init" == "systemd". There is a bit of grey when looking at the options because some things may follow a generic interface to init; the vconsole keyboard I think falls into this category and (again) there are better ways to configure that.
But forging ahead anyway, see
man kernel-command-line.1 If you go from there to
man systemd-vconsole-setup.service and then
man vconsole.conf, you'll find settings from
/etc/vconsole.conf that can be applied via kernel params (although again, it's all actually done by systemd). The parameter is:
Unfortunately, finding what options there are requires more digging. On other linux, systemd based systems
localctl list-keymaps works, but it doesn't show me anything on Raspbian. There are quite a few different dvorak layouts, but probably the first two I'd try would be:
One is probably a synonym for the other.
Beware, again, this doesn't affect the GUI. For that you need to use either
raspi-config and or whatever setting tools your DE offers (the default DE on Raspbian being PIXEL).
1. Note that while the
kernel-parameters.txt mentioned there is still in the source archive if you download it, the online version has changed location and gotten a bit snazzier: https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html ...However, the keyboard is not part of this, or at least, not in the sense you need.