Keyboard without Scroll Lock

Harry Matthiesen Jensen freebsd at
Wed Sep 26 10:17:21 PDT 2007


I don't know where to post this, except from this list, so maybe someone
will add it to a FAQ ;-).

just for info, if you happens to buy a keyboard without the Scroll Lock
key, as I did (Logitech EX110), and are missing this function in consoles,
I found a solution with re-configuring the keymap (I'm probably not the
first, but did not find a short solution on the web).

As root:

Dump the keyboard map to a file
	kbdcontrol -d >mykeys

Change the file so "Ctrl+NumLock" will set
"Scroll Lock".

Find line with scancode "base" 069, or where "nlock" fills
the entire line.

Edit column 3 from "nlock" to "slock"

The line now looks like:
"069   nlock  nlock  slock  nlock  nlock  nlock  nlock  nlock   O"

Edit /etc/rc.conf:
keymap="/home/xxx/mykeys" #where the file is

Reboot, and now "Ctrl+NumLock" will toggle the Scroll Lock bit.

Before you reboot it is possible to try if it works.

As root, issue the command:
	kbdcontrol -l mykeys

Mvh/Brgds Harry
FreeBSD mugin.localhost 7.0-CURRENT #8: i386

More information about the freebsd-questions mailing list