Changing the Keyboard Layout for Single User Mode

internationalizationkeyboardsingle-user

Apple says: "When in single-user mode, the keyboard layout is U.S. English." (emphasis added)

Naturally, not every hardware keyboard to be used on a Mac in Single User Mode actually is printed according to the US English layout. Searching for answers on how to change the layout used in that mode came up empty. Depending on the real hardware used, even typing basic stuff on a non US-keyboard can become extremely difficult in SU-mode.

How should one change that, preferably pro-actively, before one has to do complex things in Single User Mode?

Only Bonus: Preferable answer would be a universal one that achieves that programmatically.
That is: even better than "load French azerty layout by… "

Best Answer

English is the default language because it is what is compiled in the kernel.

For example: In *BSD, we can change the language by adding those specific options to the make.conf file when compiling a custom kernel:

options         ATKBD_DFLT_KEYMAP
makeoptions     ATKBD_DFLT_KEYMAP="german.iso"

In the above example, the Single User Mode will be in German.

What you are asking for is not feasible because in Single User Mode, nothing is mounted. Even the boot volume isn't fully mounted. There are no dameons, no services, nothing. It's about as minimal an environment you can possibly get and what gets mounted will depend strictly on what you want to do.

The keyboard mappings don't occur until well into the boot process - after drivers have been loaded for the various devices (like the keyboard)

Is it possible (likely) that Apple has compiled different kernels for different regions? Sure, but since I don't have access to those at the moment, I can't verify. We have many users from around the world and I am sure they can weigh in here.