You can use the
loadkeys command to remap keys on the Linux console. The following lines define the key bindings to switch consoles (on a PC keyboard):
alt keycode 105 = Decr_Console
alt keycode 106 = Incr_Console
Load your own keymap file that overrides these bindings with an escape sequence that fish recognizes. To make a key send an escape sequence, you need to bind it to a key name of the form
FNUMBER and define a character sequence for
alt keycode 105 = F105
alt keycode 106 = F106
string F105 = "\033\033[D"
string F105 = "\033\033[C"
Different distributions (and sometimes different packages for console support) store the system boot-time keymap in different locations under
/etc. Look for a file called
/etc or consult your distribution's manual. Some distributions store a the keymap's name in
/etc instead and put the actual keymap elsewhere; look for a keymap-related setting under
/etc/sysconfig or other configuration directory.
You can either write your own keymap and use
include "/path/to/foo.map" to reference the system keymap, or arrange to load your own keymap containing just the settings you want to change during the boot process.