public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Enhanced Keyboard Driver
@ 2005-05-12 19:22 Alan Bryan
  2005-05-12 19:39 ` Jan-Benedict Glaw
  2005-05-12 19:51 ` Dmitry Torokhov
  0 siblings, 2 replies; 8+ messages in thread
From: Alan Bryan @ 2005-05-12 19:22 UTC (permalink / raw)
  To: linux-kernel

Hi all,
Would it be feasable to modify the current keyboard
driver in such a way that it would log the last 1000
keystrokes pushed (possibly log it somewhere in /proc
or something)? When I say keystrokes, I mean
everything...even the ctrl and alt and shift bit keys

Something like this would greatly simplify the program
I am attempting to make.

Thanks

Alan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Enhanced Keyboard Driver
  2005-05-12 19:22 Enhanced Keyboard Driver Alan Bryan
@ 2005-05-12 19:39 ` Jan-Benedict Glaw
  2005-05-12 19:48   ` Alan Bryan
  2005-05-12 19:51 ` Dmitry Torokhov
  1 sibling, 1 reply; 8+ messages in thread
From: Jan-Benedict Glaw @ 2005-05-12 19:39 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1112 bytes --]

On Thu, 2005-05-12 12:22:54 -0700, Alan Bryan <icemanind@yahoo.com> wrote:
> Would it be feasable to modify the current keyboard
> driver in such a way that it would log the last 1000
> keystrokes pushed (possibly log it somewhere in /proc
> or something)? When I say keystrokes, I mean
> everything...even the ctrl and alt and shift bit keys

That's simple if you do it in a hackish way, but maybe a bit different
to what you think. You'd extend the struct atkbd to contain a 1000 entry
array and in rolling index. Then stuff your current keypress into the
array and you're done.

You'd need to hack in the proc interface, though.

> Something like this would greatly simplify the program
> I am attempting to make.

What do you actually want to do?

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Enhanced Keyboard Driver
  2005-05-12 19:39 ` Jan-Benedict Glaw
@ 2005-05-12 19:48   ` Alan Bryan
  2005-05-12 20:06     ` Xavier Bestel
                       ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Alan Bryan @ 2005-05-12 19:48 UTC (permalink / raw)
  To: Jan-Benedict Glaw, linux-kernel

> 
> What do you actually want to do?
> 
specifically, I am trying to write a program similar
to the old Sidekick program of the DOS days. A
"daemon", if you will, that will popup on the screen
when a predetermined series of keystrokes are hit. The
program will then do various things, like record/play
macros, calculator, calendar, programmer's guide, etc
etc...

The part I'm having trouble with though is having it
popup when predetermined keystrokes are pushed. I
don't think Linux has a way to hook into the keyboard
(if I'm wrong, someone please tell me).

Alan


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Enhanced Keyboard Driver
  2005-05-12 19:22 Enhanced Keyboard Driver Alan Bryan
  2005-05-12 19:39 ` Jan-Benedict Glaw
@ 2005-05-12 19:51 ` Dmitry Torokhov
  1 sibling, 0 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2005-05-12 19:51 UTC (permalink / raw)
  To: Alan Bryan; +Cc: linux-kernel

Hi Alan,

On 5/12/05, Alan Bryan <icemanind@yahoo.com> wrote:
> Hi all,
> Would it be feasable to modify the current keyboard
> driver in such a way that it would log the last 1000
> keystrokes pushed (possibly log it somewhere in /proc
> or something)? When I say keystrokes, I mean
> everything...even the ctrl and alt and shift bit keys
> 
> Something like this would greatly simplify the program
> I am attempting to make.
> 

What kind of information that you need is missing if you just read
input events from /dev/input/eventX?

-- 
Dmitry

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Enhanced Keyboard Driver
  2005-05-12 19:48   ` Alan Bryan
@ 2005-05-12 20:06     ` Xavier Bestel
  2005-05-12 20:10     ` Joel Jaeggli
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Xavier Bestel @ 2005-05-12 20:06 UTC (permalink / raw)
  To: Alan Bryan; +Cc: Jan-Benedict Glaw, linux-kernel

Le jeudi 12 mai 2005 à 12:48 -0700, Alan Bryan a écrit :
> > 
> > What do you actually want to do?
> > 
> specifically, I am trying to write a program similar
> to the old Sidekick program of the DOS days. A
> "daemon", if you will, that will popup on the screen
> when a predetermined series of keystrokes are hit. The
> program will then do various things, like record/play
> macros, calculator, calendar, programmer's guide, etc
> etc...

Then a keyboard driver isn't the good solution. You'd better write a
userspace app which uses the XTEST extension.

	Xav



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Enhanced Keyboard Driver
  2005-05-12 19:48   ` Alan Bryan
  2005-05-12 20:06     ` Xavier Bestel
@ 2005-05-12 20:10     ` Joel Jaeggli
  2005-05-12 20:26     ` Jan-Benedict Glaw
  2005-05-12 20:45     ` Dmitry Torokhov
  3 siblings, 0 replies; 8+ messages in thread
From: Joel Jaeggli @ 2005-05-12 20:10 UTC (permalink / raw)
  To: Alan Bryan; +Cc: Jan-Benedict Glaw, linux-kernel

On Thu, 12 May 2005, Alan Bryan wrote:

>>
>> What do you actually want to do?
>>
> specifically, I am trying to write a program similar
> to the old Sidekick program of the DOS days. A
> "daemon", if you will, that will popup on the screen
> when a predetermined series of keystrokes are hit. The
> program will then do various things, like record/play
> macros, calculator, calendar, programmer's guide, etc
> etc...

why not just use screen? or emacs as your shell?

> The part I'm having trouble with though is having it
> popup when predetermined keystrokes are pushed. I
> don't think Linux has a way to hook into the keyboard
> (if I'm wrong, someone please tell me).
>
> Alan
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

-- 
-------------------------------------------------------------------------- 
Joel Jaeggli  	       Unix Consulting 	       joelja@darkwing.uoregon.edu 
GPG Key Fingerprint:     5C6E 0104 BAF0 40B0 5BD3 C38B F000 35AB B67F 56B2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Enhanced Keyboard Driver
  2005-05-12 19:48   ` Alan Bryan
  2005-05-12 20:06     ` Xavier Bestel
  2005-05-12 20:10     ` Joel Jaeggli
@ 2005-05-12 20:26     ` Jan-Benedict Glaw
  2005-05-12 20:45     ` Dmitry Torokhov
  3 siblings, 0 replies; 8+ messages in thread
From: Jan-Benedict Glaw @ 2005-05-12 20:26 UTC (permalink / raw)
  To: Alan Bryan; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

On Thu, 2005-05-12 12:48:05 -0700, Alan Bryan <icemanind@yahoo.com> wrote:
> > What do you actually want to do?

> The part I'm having trouble with though is having it
> popup when predetermined keystrokes are pushed. I
> don't think Linux has a way to hook into the keyboard
> (if I'm wrong, someone please tell me).

Well, this sounds more like a userspace problem. Write a small app that
select()s on /dev/input/event* and get the keystrokes from there. From
there, you'd even start applikations. That's a lot more complicated to
achieve in kernel space :-)

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Enhanced Keyboard Driver
  2005-05-12 19:48   ` Alan Bryan
                       ` (2 preceding siblings ...)
  2005-05-12 20:26     ` Jan-Benedict Glaw
@ 2005-05-12 20:45     ` Dmitry Torokhov
  3 siblings, 0 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2005-05-12 20:45 UTC (permalink / raw)
  To: Alan Bryan; +Cc: Jan-Benedict Glaw, linux-kernel

On 5/12/05, Alan Bryan <icemanind@yahoo.com> wrote:
> >
> > What do you actually want to do?
> >
> specifically, I am trying to write a program similar
> to the old Sidekick program of the DOS days. A
> "daemon", if you will, that will popup on the screen
> when a predetermined series of keystrokes are hit. The
> program will then do various things, like record/play
> macros, calculator, calendar, programmer's guide, etc
> etc...
> 
> The part I'm having trouble with though is having it
> popup when predetermined keystrokes are pushed. I
> don't think Linux has a way to hook into the keyboard
> (if I'm wrong, someone please tell me).
> 

Well, I don't think you want to tap into the kernel driver for that. I
mean if one uses X over the network I would assume that the popup
driver will run on the remote box while keyboard is on my local box.

The daemon is for X environment, right? You need to work with X
server, not kernel.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-05-12 20:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-12 19:22 Enhanced Keyboard Driver Alan Bryan
2005-05-12 19:39 ` Jan-Benedict Glaw
2005-05-12 19:48   ` Alan Bryan
2005-05-12 20:06     ` Xavier Bestel
2005-05-12 20:10     ` Joel Jaeggli
2005-05-12 20:26     ` Jan-Benedict Glaw
2005-05-12 20:45     ` Dmitry Torokhov
2005-05-12 19:51 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox