lkml.org 
[lkml]   [1999]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] Re: "Internet Keyboard" support for Linux
On Fri, Dec 10, 1999 at 10:24:47PM +0000, Ryan Lortie wrote:

> The only thing I want is _that hook in the kernel_.

> At the top of keyboard.c, we add:
> static int (* keyboard_addon)( unsigned char scancode, int down ) = 0;
> EXPORT_SYMBOL(keyboard_addon);
>
> and in the handle_scancode routine (near the very top, just after the variable
> declarations):
> if( keyboard_addon )
> if( keyboard_addon( scancode, down ) )
> return;

> This is a very generic interface that could be used for many things, several of
> which I am personally interested in implimenting.

Yes, but as I said in my previous note: I think you should consider
using keycode instead of scancode.

There are lots of advantages: No need to parse scancode sequences both in
the kernel and in your module. Added flexibility - if your module eats
certain keycodes then you can make any key act on that module by a
change in keymap. Added usability: others with a keyboard that produces
different scancodes can still use your module.
A cleaner kernel source: as soon as this hook is present we can throw out
all mention of SYSRQ from all kernel code, and have SYSRQ treatment
just as an example module that uses this hook.

Andries

-
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/

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