O'Reilly logo

Absolute OpenBSD, 2nd Edition by Michael W. Lucas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Keyboard Mapping

OpenBSD tries to guess your correct keyboard mapping. USB keyboards have mechanisms to declare their country code. If autodetection doesn’t work, you can change the keyboard layout with kbd(8), and set it at boot with /etc/kbdtype.

Before touching the keyboard layout, use kbd to find your current keyboard map. kbd -l lists the more than 100 keyboard encodings OpenBSD supports. Browse the list for your supported keyboard layout, or use grep to reduce the list. I’m a Dvorak user, so I search for it like this:

# kbd -l | grep dvorak
fr.dvorak
us.dvorak
…

My preferred layout is us.dvorak. I enter us.dvorak in /etc/kbdtype, and after my next reboot, the console should use the Dvorak layout.

To set the keymap immediately to Dvorak, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required