DEV Community

Cover image for NetBSD non-us keyboard configuration
Efe Ertugrul
Efe Ertugrul

Posted on • Originally published at efeertugrul.com

NetBSD non-us keyboard configuration

Summary

In this part i'm going to configure my non-us keyboard by changing or adding some system configuration files for keyboard. US keyboard users can skip this part.

This part requires you to know basic usage of vi program. If you don't know how to use vi or vim check this website first: NetBSD vi tutorial

vi is almost always pre-installed in every operating system. Learning vi is never a bad idea.

vi basic usage cheatsheet:

Command Meaning
h move cursor left
j move cursor down
k move cursor up
l move cursor right
a add after char
i add before char
A add end of line
I add start of line
o add below line
O add above line
dd delete one line
x delete one char
:w save
:q quit
:wq save and quit
:w! force save
:q! force quit

Instructions

1- Start your system and login.

netbsd-keyboard-001

2- Changing the system configuration requires privilege. So switch to root user with su command.

netbsd-keyboard-002

3- Open wscons.conf file with vi editor.

netbsd-keyboard-003

4- I'm using tr keyboard. So im going to add encoding tr configuration in this file.

netbsd-keyboard-004

5- I'm also going to edit keymaps because my current keyboard doesn't have a less, greater key. (These characters: "<>|"). This requires me to go to /usr/share/wscons/keymaps/ folder. And create a new file named overlay.tr with vi editor. (You can use anything as file name but do not forget it. We're gonna need it)

netbsd-keyboard-005

6- What i'm going to do in this file that i'm going to set some unusable turkish character buttons to bar '|' less '<' and greater '>' characters. For example there is a 'ş' character in my keyboard. It's unusable in console but i might need '|' character so i've added keycode 39 = bar line in this file to set 'ş' button to bar '|' character. I've also set 'ö' and 'ç' buttons to use less '<' and greater '>'. (You can check your full keymap with this command: wsconsctl map | less)

netbsd-keyboard-006

7- Again, open your wscons.conf file with vi editor.

netbsd-keyboard-003

8- Add mapfile /usr/share/wscons/keymaps/overlay.tr configuration and save it.

netbsd-keyboard-007

9- Restart the system with shutdown -r now to load these new keyboard configurations.

netbsd-keyboard-008

netbsd-keyboard-009

10- When system starts, login with user and try your configured buttons. If you can see your characters it means that your keyboard configurations are working.

netbsd-keyboard-010

Next part: Internet connection configuration.

Top comments (0)