Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Apr 2010 11:20:50 +0200
From:      Michael Cardell Widerkrantz <mc@hack.org>
To:        freebsd-hackers@freebsd.org
Subject:   Keyboard scancodes
Message-ID:  <868w8e5xu5.fsf@brain.hack.org>

next in thread | raw e-mail | index | archive | help
I was recently given an original Happy Hacking Keyboard. As I sometimes
work in the FreeBSD console, I wanted to have my usual console keymap
adjusted to the new keyboard, but didn't know the scancode for the HHKB
meta key (the diamond key). I couldn't find any program in base or ports
that would show me the scancodes, so I ended up writing my own:

  http://hack.org/mc/hacks/kbdscan/

It's little more than a quick hack done while my baby daughter was
napping, but it works for my purposes. The program sets the FreeBSD
console keyboard in raw scancode mode and the terminal in raw mode
without echo. It then shows scancodes of keys pressed and released.

Five seconds of inactivity resets the keyboard and terminal to the
original modes and quits the program. Nota bene: If the process receives
any signals, it will currently leave the keyboard and console in the raw
mode.

When I was searching for information about this, I found a lot of
similar questions on freebsd-questions and in other fora about similar
problems, so I thought I should post about it. Please excuse me if this
is inappropriate.

Happy hacking,
MC.

-- 
http://hack.org/mc/
Use plain text e-mail, please. OpenPGP welcome, 0xE4C92FA5.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?868w8e5xu5.fsf>