wiki:linux/Console

Setting font with slashed/dotted zero

PC Screen Fonts (.psf) gesucht...

The easiest way is to run dpkg-reconfigure console-setup and select Terminus as fontface.
Another way is to edit /etc/default/console-setup and add (or uncomment it)

FONTFACE="Terminus"

Define backtab key (ISO_left_tab)

backtab howto
shift-tab (ISO_left_tab) auf console (tty)...

By default the backtab key respectively the combination shift tab won't be recognized from the console. Therefore it is not readily possible to capture this key combination for using in programs such as vim?.

By example if vim? receives the back-tab keycode which is defined as string \033[Z in mostly applications this keycode will be interpreted as <S-Tab>.
Well, to getting the console to send the keycode \033[Z by pressing shift-tab the following steps are needed:

First of all we must know the consoles keycode for the tab key. Start showkey and press tab:

$ showkey
KB-Modus war UNICODE
[ Wenn Sie das unter X probieren, muss es nicht funktionieren, 
  da der X Server ebenfalls von /dev/console liest. ]

Drücken Sie eine Taste (Programmende 10 s nach dem letzten Tastendruck)...
Tastencode  28 losgelassen
Tastencode  15 gedrückt
Tastencode  15 losgelassen

So we must create a new mapping to a "dummy" key F100 or higher, if your keyboard has more than 100 function keys... ;-) and assign the keycode string \033[Z to it.

Add this lines to /etc/console-setup/remap.inc or create this file if it doesn't exist:

# define backtab / shift-tab
shift keycode 15 = F100
string F100 = "\033[Z"

To test if this new mapping will work, load it with loadkeys:

# loadkeys /etc/console-setup/remap.inc

In order that this keymapping would be load at boot time it must be make known in the keyboard configuration. Therefore add this line within the /etc/default/keyboard:

KMAP=/etc/console-setup/remap.inc

Console switching keys

Switching between the consoles via strg-alt-F[1..7] is an ugly thing. With the following mapping this can be make easier.
Insert these lines to /etc/console-setup/remap.inc:

# jump to console [1..7] via alt-[1..7]
alt keycode 2 = Console_1
alt keycode 3 = Console_2
alt keycode 4 = Console_3
alt keycode 5 = Console_4
alt keycode 6 = Console_5
alt keycode 7 = Console_6
alt keycode 8 = Console_7

# jump to next console via alt-j
alt keycode 36 = Incr_Console

# jump to prev console via alt-k
alt keycode 37 = Decr_Console

# jump to last used console via alt-tab
alt keycode 15 = Last_Console
Last modified 6 years ago Last modified on Mar 21, 2013, 9:20:32 AM