Keyboard hacking?

Gossamer (gossamer@tertius.net.au)
Wed, 31 Dec 1997 00:58:45 +1100


Has anybody ever modified keyboard.c (presumably the handle_scancode()
routine, mostly) to cope with chorded input? The pseudocode'd be
something like this:

if scancode indicates a key-press event
add this key to the array of currently-pressed keys
else (key-release event)
if previous scancode indicates a key-press event
lookup the key that maps to the array of currently-pressed keys and
return that.
if there isn't one, beep or something
endif
remove this key from the array of currently-pressed keys
endif

I could probably figure out the code for it if I poked hard enough,
but C isn't my forte so I thought I'd ask first.

Other than that, hints/suggestions/slaps-around-the-ear would be
helpful.

Gossamer

-- 
: Gossamer - gossamer@tertius.net.au - http://www.tertius.net.au/~gossamer/
: Imagination is more important than knowledge.  -- Albert Einstein