Table of Contents
Amiga OS
Workbench v3
Questions
Keymapping
Question: I did a fresh install of the Cloanto amiga-os-310-install.adf disk to a hard drive, and then I wanted to change the keyboard layout to Swedish. I tried SYS:System/SetMap s but then I've learned that SetMap was deprecated in Workbench 2. Then I tried SETKEYBOARD s which seems to work from a shell, but not when I put it in S\Startup-Sequence.
What can I put in S\Startup-Sequence?
Answer 1: SETKEYBOARD only changes the keyboard layout for the current console (unlike SETMAP from older AmigaOS versions, which changes the layout globally), hence running SETKEYBOARD from s/startup-sequence won't affect other shells than the startup shell itself. Permanent/global keyboard layout changes can be made in Input Preferences in Prefs, where the language/layout can be selected as Keyboard Type. As described in Daedalus' comment below, desired keymaps can be copied to DEVS:Keymaps from Storage.
The locale doesn't necessarily have to be installed, but the keymap file does. These are stored on the Storage floppy (or storage drawer of a full hard drive installation), and are activated by moving the desired one to DEVS:Keymaps. Once there, the relevant layout will show up in Prefs/Input. They're independent of Locale settings, which allows you to use a German keyboard for example while the system language is still in English, or vice versa
Answer 2: Adding to Answer 1 - you should never, ever modify the Startup-Sequence. Since Release 2.0 the Startup-Sequence was declared for private use by Commodore, because the system boots in a way to improve compatibility with releases 1.x.
In particular, the combination of SetPatch and IPrefs enable advanced features that otherwise stay disabled (the most important one is graphics.library and Intuition to use new fetch modes when running under an AGA machine, but there are other tidbits too). How the two commands interact was never fully documented, and probably not even tested by Commodore, so adding anything in-between is looking for undefined behavior.
It's occasionally required to run commands before SetPatch, but these are commands that mess with the very low levels of the OS, such as developer's tools, debuggers, commands that play with the MMU, or tools to configure third-party accelerator boards; in this case the command's documentation will explicitly say to add it before SetPatch, and you can trust them.
Bottom line: if you need to run DOS commands during the boot, use the User-Startup mechanism introduced in Release 2.0: create a file named User-Startup inside the S: assign (if it is not already there; it usually is) and add your command(s) there. For the record, this is also where Install adds commands required by third-party application.