lkml.org 
[lkml]   [1998]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: keyboard w/ extra keys
    Date:     Sun, 06 Sep 1998 00:53:24 -0500
From: Jim Niemira <urmane@urmane.org>

Apologies for the bad form of following up my own post; it appears
that cruising through syslog shows a number of lines like:
[snip]keyboard: unknown scancode e0 17

Cruising through the logfile with:
fgrep keyboard messages | awk '{print $9 , " " , $10}' | sort -u

gives me:
e0 10
e0 12
e0 17
e0 18
e0 19
e0 1e
e0 20
e0 22
e0 24
e0 25
e0 26
e0 2e
e0 30
e0 32

14 lines, what a coincidence, there's 14 buttons. BTW, the lines only
appear once, despite hitting the keys many times - how come?

Anyway, I found the relevant code in drivers/char/keyboard.c, but don't
know where to start hacking. Clues?

jim

There are two entirely unrelated activities:
Getting these keys to work on the console, and getting these keys
to work with X. The former is easy (so is the only part I'll describe).
The kernel translates scancodes into keycodes, using a fixed table.
Then it translates keycodes into characters put into the input queue
using your keymap.

However, just for cases like yours, the fixed table is not absolutely fixed,
and with the utility setkeycodes(8) you may attach keycodes of your liking
to these new keys. (112-118,120-127 are 15 free values)

Once they have keycodes, they will no longer produce syslog messages,
and in your keymap you can attach symbols or strings or actions to them,
using loadkeys.

That is the console part.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/faq.html

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.022 / U:1.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site