All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [patch 1/1] thinkpad fn+fx key driver
@ 2004-09-23  5:16 Brown, Len
       [not found] ` <F7DC2337C7631D4386A2DF6E8FB22B300179B935-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 17+ messages in thread
From: Brown, Len @ 2004-09-23  5:16 UTC (permalink / raw)
  To: Vojtech Pavlik, akpm-3NddpPZAyC0
  Cc: erik-aH8aFkyL5XJBDgjK7y7TUQ, ACPI Developers

 
>On Wed, Sep 22, 2004 at 01:28:49PM -0700, akpm-3NddpPZAyC0@public.gmane.org wrote:
>> 
>> From: Erik Rigtorp <erik-aH8aFkyL5XJBDgjK7y7TUQ@public.gmane.org>
>> 
>> Changes since last version:
>>  - use the acpi handle provided by acpi_bus_register_driver, 
>this way it
>>    should work on more models.
>>  - correct handling of return value from acpi_bus_register_driver
>> 
>> Signed-off-by: Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>
>
>Very nice. Even nicer because I have a thinkpad and I was considering
>writing an extra keys driver that'd poll the CMOS, which would be quite
>a hack.
>
>I have a question, though:
>	Wouldn't it be better to have the keys pass through the input
>	event layer instead of the ACPI event layer?
>
>That way the keys would work the same as on regular machines/keyboards,
>simplifying the userspace handling ... we could also take the opposite
>approach and add handlers to the keymap to send ACPI events for regular
>wake/sleep/power keys on keyboards.
>
>The same would apply to Toshiba and ASUS as well.

This is an emerging area, yes -- consider nothing final;-)

Others too have suggested using the input layer
for hot keys.  I must plead ignorance of the input layer
and how adaptable it is.

My PS/2 keyboard has sleep/wakeup/power buttons
that work on Windows, at least the sleep one works.
What is necessary for them to work on Linux?
That will probably be an easier problem to solve,
and the more exotic buttons on laptops which do
things like switch the display and dim the screen
via ACPI methods may be harder.

thanks,
-Len





-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

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

* Re: [patch 1/1] thinkpad fn+fx key driver
       [not found] ` <F7DC2337C7631D4386A2DF6E8FB22B300179B935-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2004-09-23 11:24   ` Vojtech Pavlik
       [not found]     ` <20040923112457.GB1083-+ZI9xUNit7I@public.gmane.org>
  0 siblings, 1 reply; 17+ messages in thread
From: Vojtech Pavlik @ 2004-09-23 11:24 UTC (permalink / raw)
  To: Brown, Len; +Cc: akpm-3NddpPZAyC0, erik-aH8aFkyL5XJBDgjK7y7TUQ, ACPI Developers

On Thu, Sep 23, 2004 at 01:16:57AM -0400, Brown, Len wrote:
>  
> >On Wed, Sep 22, 2004 at 01:28:49PM -0700, akpm-3NddpPZAyC0@public.gmane.org wrote:
> >> 
> >> From: Erik Rigtorp <erik-aH8aFkyL5XJBDgjK7y7TUQ@public.gmane.org>
> >> 
> >> Changes since last version:
> >>  - use the acpi handle provided by acpi_bus_register_driver, 
> >this way it
> >>    should work on more models.
> >>  - correct handling of return value from acpi_bus_register_driver
> >> 
> >> Signed-off-by: Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>
> >
> >Very nice. Even nicer because I have a thinkpad and I was considering
> >writing an extra keys driver that'd poll the CMOS, which would be quite
> >a hack.
> >
> >I have a question, though:
> >	Wouldn't it be better to have the keys pass through the input
> >	event layer instead of the ACPI event layer?
> >
> >That way the keys would work the same as on regular machines/keyboards,
> >simplifying the userspace handling ... we could also take the opposite
> >approach and add handlers to the keymap to send ACPI events for regular
> >wake/sleep/power keys on keyboards.
> >
> >The same would apply to Toshiba and ASUS as well.
> 
> This is an emerging area, yes -- consider nothing final;-)
> 
> Others too have suggested using the input layer
> for hot keys.  I must plead ignorance of the input layer
> and how adaptable it is.
> 
> My PS/2 keyboard has sleep/wakeup/power buttons
> that work on Windows, at least the sleep one works.
> What is necessary for them to work on Linux?
> That will probably be an easier problem to solve,
> and the more exotic buttons on laptops which do
> things like switch the display and dim the screen
> via ACPI methods may be harder.

There are several ways to make both the keyboard and ACPI keys work as
intended:

1) Extend acpid to listen on all /dev/input/event keyboard devices and
   call scripts when the keys are pressed. No change to the kernel.

2) Change ACPI to use the Input API, and add possibility to map ACPI
   events in the keymap. Then have acpid listen to those.

3) Change ACPI to use the Input API and use the power.ko module for
   mapping the keys to system state change actions.

4) Change ACPI to use the Input API and have a daemon that handles
   all extra keys, including sound volume and application keys, possibly
   using D-bus to send the events to the desktop environment.

5) Change power.ko to just generate ACPI events for the keys. Handle
   the events via acpid.

I probably prefer 4), although all make sense. I think 3) is only useful
for embedded systems, because it's not configurable enough. 2) would
probably not work when in X, because it relies on the console subsystem.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]     ` <20040923112457.GB1083-+ZI9xUNit7I@public.gmane.org>
@ 2004-09-23 12:31       ` Timo Hoenig
  2004-09-24 13:41       ` Pavel Machek
  1 sibling, 0 replies; 17+ messages in thread
From: Timo Hoenig @ 2004-09-23 12:31 UTC (permalink / raw)
  To: Vojtech Pavlik
  Cc: Brown, Len, akpm-3NddpPZAyC0, erik-aH8aFkyL5XJBDgjK7y7TUQ, ML ACPI-devel

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

Hi,

On Thu, 2004-09-23 at 13:24 +0200, Vojtech Pavlik wrote:
> On Thu, Sep 23, 2004 at 01:16:57AM -0400, Brown, Len wrote:

[...]

> There are several ways to make both the keyboard and ACPI keys work as
> intended:
> 
> 1) Extend acpid to listen on all /dev/input/event keyboard devices and
>    call scripts when the keys are pressed. No change to the kernel.
> 
> 2) Change ACPI to use the Input API, and add possibility to map ACPI
>    events in the keymap. Then have acpid listen to those.
> 
> 3) Change ACPI to use the Input API and use the power.ko module for
>    mapping the keys to system state change actions.
> 
> 4) Change ACPI to use the Input API and have a daemon that handles
>    all extra keys, including sound volume and application keys, possibly
>    using D-bus to send the events to the desktop environment.
> 
> 5) Change power.ko to just generate ACPI events for the keys. Handle
>    the events via acpid.
> 
> I probably prefer 4), although all make sense. I think 3) is only useful
> for embedded systems, because it's not configurable enough. 2) would
> probably not work when in X, because it relies on the console subsystem.

Since I am working on a project (Input Abstraction Layer) which is
exactly what Pavlik mentioned with 4) I wanted to raise my voice. It is
a daemon which can easily be enhanced by modules which are dynamically
loaded. There are going to be three different module types: Input,
output and in/output modules.

Input modules simply gather events and send them via D-Bus to clients
(for example: module for normal ACPI events).

Output modules do not gather data but can receive messages from clients
and react on these messages (for example: module for the new sony_acpi
driver).

In- & Output modules do both (for example: module for the toshiba_acpi
driver).

I'm blogging about the development on http://thesis.nouse.net. Expect a
first version within the next four weeks.

   Timo

..............................................................
Timo Hönig <thoenig at nouse dot net>
..................................................:: gpg ::...
Fingerprint: 0998 0ACA A1D2 2612 4D96 DD8B E03F 084B B305 4066

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]     ` <20040923112457.GB1083-+ZI9xUNit7I@public.gmane.org>
  2004-09-23 12:31       ` Timo Hoenig
@ 2004-09-24 13:41       ` Pavel Machek
       [not found]         ` <20040924134118.GA467-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>
       [not found]         ` <1096112154.10736.10.camel@localhost.localdomain>
  1 sibling, 2 replies; 17+ messages in thread
From: Pavel Machek @ 2004-09-24 13:41 UTC (permalink / raw)
  To: Vojtech Pavlik
  Cc: Brown, Len, akpm-3NddpPZAyC0, erik-aH8aFkyL5XJBDgjK7y7TUQ,
	ACPI Developers

Hi!

> There are several ways to make both the keyboard and ACPI keys work as
> intended:
> 
> 1) Extend acpid to listen on all /dev/input/event keyboard devices and
>    call scripts when the keys are pressed. No change to the kernel.
> 
> 2) Change ACPI to use the Input API, and add possibility to map ACPI
>    events in the keymap. Then have acpid listen to those.
> 
> 3) Change ACPI to use the Input API and use the power.ko module for
>    mapping the keys to system state change actions.
> 
> 4) Change ACPI to use the Input API and have a daemon that handles
>    all extra keys, including sound volume and application keys, possibly
>    using D-bus to send the events to the desktop environment.

I like this one.

Having vol+/vol- keys would be  very welcome. This daemon would
have to understand scancodes for a lot of
different keyboards, but perhaps
that is easy enough to create incrementally.

Hmm, the same daemon might know enough about machine's sound system
(on notebooks for example; to be able to setup initial mixer levels.

				Pavel
-- 
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms         



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]         ` <20040924134118.GA467-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>
@ 2004-09-24 14:22           ` Vojtech Pavlik
       [not found]             ` <20040924142248.GA2593-+ZI9xUNit7I@public.gmane.org>
  2004-10-01 17:32           ` Stefan Seyfried
  1 sibling, 1 reply; 17+ messages in thread
From: Vojtech Pavlik @ 2004-09-24 14:22 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Brown, Len, akpm-3NddpPZAyC0, erik-aH8aFkyL5XJBDgjK7y7TUQ,
	ACPI Developers

On Fri, Sep 24, 2004 at 03:41:18PM +0200, Pavel Machek wrote:
> Hi!
> 
> > There are several ways to make both the keyboard and ACPI keys work as
> > intended:
> > 
> > 1) Extend acpid to listen on all /dev/input/event keyboard devices and
> >    call scripts when the keys are pressed. No change to the kernel.
> > 
> > 2) Change ACPI to use the Input API, and add possibility to map ACPI
> >    events in the keymap. Then have acpid listen to those.
> > 
> > 3) Change ACPI to use the Input API and use the power.ko module for
> >    mapping the keys to system state change actions.
> > 
> > 4) Change ACPI to use the Input API and have a daemon that handles
> >    all extra keys, including sound volume and application keys, possibly
> >    using D-bus to send the events to the desktop environment.
> 
> I like this one.
> 
> Having vol+/vol- keys would be  very welcome. This daemon would
> have to understand scancodes for a lot of
> different keyboards, but perhaps
> that is easy enough to create incrementally.

The Volume+ and Volume- keys are actually pretty standardized and the
kernel recognizes them out of the box on 95% of machines.

The daemon could but wouldn't have to take care of uploading the correct
scancode->keycode tables to the kernel.

> Hmm, the same daemon might know enough about machine's sound system
> (on notebooks for example; to be able to setup initial mixer levels.

I think it's pretty simple to leave that to the user. 'alsactl restore'
on each boot then does the job pretty well. (Namely, if you _don't_ do
'alsactl store' on each shutdown.)

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]             ` <20040924142248.GA2593-+ZI9xUNit7I@public.gmane.org>
@ 2004-09-25 11:22               ` Pavel Machek
       [not found]                 ` <20040925112219.GC4039-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  2004-09-28 10:00               ` Hiroshi Miura
  1 sibling, 1 reply; 17+ messages in thread
From: Pavel Machek @ 2004-09-25 11:22 UTC (permalink / raw)
  To: Vojtech Pavlik
  Cc: Brown, Len, akpm-3NddpPZAyC0, erik-aH8aFkyL5XJBDgjK7y7TUQ,
	ACPI Developers

Hi!

> > Having vol+/vol- keys would be  very welcome. This daemon would
> > have to understand scancodes for a lot of
> > different keyboards, but perhaps
> > that is easy enough to create incrementally.
> 
> The Volume+ and Volume- keys are actually pretty standardized and the
> kernel recognizes them out of the box on 95% of machines.

Hmm, yes, on my machines vol- generates ^[[26~, mute ^[[25~ and vol+ nothing.

> The daemon could but wouldn't have to take care of uploading the correct
> scancode->keycode tables to the kernel.

Hmm, okay. 

Is it possible to have somehow get both keycodes and translated keys?
I guess I might want to define ctrl-alt-= as vol+ and ctrl-alt-- as
vol- for machines that do not have hardware keys.

Do you have example code using event interface, somewhere?

								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]                 ` <20040925112219.GC4039-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
@ 2004-09-25 17:55                   ` Vojtech Pavlik
       [not found]                     ` <20040925175500.GA1798-+ZI9xUNit7I@public.gmane.org>
  0 siblings, 1 reply; 17+ messages in thread
From: Vojtech Pavlik @ 2004-09-25 17:55 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Brown, Len, akpm-3NddpPZAyC0, erik-aH8aFkyL5XJBDgjK7y7TUQ,
	ACPI Developers

On Sat, Sep 25, 2004 at 01:22:20PM +0200, Pavel Machek wrote:

> > > Having vol+/vol- keys would be  very welcome. This daemon would
> > > have to understand scancodes for a lot of
> > > different keyboards, but perhaps
> > > that is easy enough to create incrementally.
> > 
> > The Volume+ and Volume- keys are actually pretty standardized and the
> > kernel recognizes them out of the box on 95% of machines.
> 
> Hmm, yes, on my machines vol- generates ^[[26~, mute ^[[25~ and vol+ nothing.

Have you tried evtest? It might be just a keymap issue.

> > The daemon could but wouldn't have to take care of uploading the correct
> > scancode->keycode tables to the kernel.
> 
> Hmm, okay. 
> 
> Is it possible to have somehow get both keycodes and translated keys?
> I guess I might want to define ctrl-alt-= as vol+ and ctrl-alt-- as
> vol- for machines that do not have hardware keys.

That's something to be handled in userspace.

> Do you have example code using event interface, somewhere?
 
Yes, the evtest source is a good example. It's in the inpututils RPM or
in the linuxconsole.sf.net CVS.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]           ` <1096112154.10736.10.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2004-09-25 17:56             ` Vojtech Pavlik
       [not found]               ` <20040925175618.GB1798-+ZI9xUNit7I@public.gmane.org>
  0 siblings, 1 reply; 17+ messages in thread
From: Vojtech Pavlik @ 2004-09-25 17:56 UTC (permalink / raw)
  To: Erik Rigtorp; +Cc: Pavel Machek, Brown, Len, ACPI Developers

On Sat, Sep 25, 2004 at 01:35:54PM +0200, Erik Rigtorp wrote:
> On fre, 2004-09-24 at 15:41 +0200, Pavel Machek wrote:
> > Hi!
> > 
> > > There are several ways to make both the keyboard and ACPI keys work as
> > > intended:
> > > 
> > > 1) Extend acpid to listen on all /dev/input/event keyboard devices and
> > >    call scripts when the keys are pressed. No change to the kernel.
> > > 
> > > 2) Change ACPI to use the Input API, and add possibility to map ACPI
> > >    events in the keymap. Then have acpid listen to those.
> > > 
> > > 3) Change ACPI to use the Input API and use the power.ko module for
> > >    mapping the keys to system state change actions.
> > > 
> > > 4) Change ACPI to use the Input API and have a daemon that handles
> > >    all extra keys, including sound volume and application keys, possibly
> > >    using D-bus to send the events to the desktop environment.
> > 
> > I like this one.
> > 
> > Having vol+/vol- keys would be  very welcome. This daemon would
> > have to understand scancodes for a lot of
> > different keyboards, but perhaps
> > that is easy enough to create incrementally.
> > 
> > Hmm, the same daemon might know enough about machine's sound system
> > (on notebooks for example; to be able to setup initial mixer levels.
> 
> I think the issue here was how to handle keys that are not on keyboard.
> For example the Fn+Fx and volume buttons on the thinkpads, they generate
> acpi events instead.
 
Yes, the question was whether it's a good idea to make them generate
regular key events like the normal keys on keyboard do, and I believe
the answer is yes.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]               ` <20040925175618.GB1798-+ZI9xUNit7I@public.gmane.org>
@ 2004-09-26 18:54                 ` Karol Kozimor
       [not found]                   ` <20040926185454.GA7960-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
  0 siblings, 1 reply; 17+ messages in thread
From: Karol Kozimor @ 2004-09-26 18:54 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Erik Rigtorp, Pavel Machek, Brown, Len, ACPI Developers

Thus wrote Vojtech Pavlik:
> Yes, the question was whether it's a good idea to make them generate
> regular key events like the normal keys on keyboard do, and I believe
> the answer is yes.

Well, there's certainly _some_ reasoning behind the laptop keys generating
ACPI events and not key events on some notebooks? Not that I'm aware of
any, unfortunately...
Best regards,

-- 
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]                     ` <20040925175500.GA1798-+ZI9xUNit7I@public.gmane.org>
@ 2004-09-27 13:40                       ` Randy.Dunlap
  0 siblings, 0 replies; 17+ messages in thread
From: Randy.Dunlap @ 2004-09-27 13:40 UTC (permalink / raw)
  To: Vojtech Pavlik
  Cc: pavel-AlSwsSmVLrQ, len.brown-ral2JQCrhuEAvxtiuMwx3w,
	akpm-3NddpPZAyC0, erik-aH8aFkyL5XJBDgjK7y7TUQ,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Sat, 25 Sep 2004 19:55:02 +0200 Vojtech Pavlik wrote:

| On Sat, Sep 25, 2004 at 01:22:20PM +0200, Pavel Machek wrote:
| 
| > > > Having vol+/vol- keys would be  very welcome. This daemon would
| > > > have to understand scancodes for a lot of
| > > > different keyboards, but perhaps
| > > > that is easy enough to create incrementally.
| > > 
| > > The Volume+ and Volume- keys are actually pretty standardized and the
| > > kernel recognizes them out of the box on 95% of machines.
| > 
| > Hmm, yes, on my machines vol- generates ^[[26~, mute ^[[25~ and vol+ nothing.
| 
| Have you tried evtest? It might be just a keymap issue.
| 
| > > The daemon could but wouldn't have to take care of uploading the correct
| > > scancode->keycode tables to the kernel.
| > 
| > Hmm, okay. 
| > 
| > Is it possible to have somehow get both keycodes and translated keys?
| > I guess I might want to define ctrl-alt-= as vol+ and ctrl-alt-- as
| > vol- for machines that do not have hardware keys.
| 
| That's something to be handled in userspace.
| 
| > Do you have example code using event interface, somewhere?
|  
| Yes, the evtest source is a good example. It's in the inpututils RPM or
| in the linuxconsole.sf.net CVS.

And a HID events tutorial and sample code from Brad Hards:

http://www.frogmouth.net/hid-doco/linux-hid.html

http://www.frogmouth.net/hid-doco/examples/hiddev-misc/dump-events.c
http://www.frogmouth.net/hid-doco/examples/hiddev-misc/write-events.c


--
~Randy
MOTD:  Always include version info.
(Again.  Sometimes I think ln -s /usr/src/linux/.config .signature)


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]                   ` <20040926185454.GA7960-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
@ 2004-09-28  8:55                     ` Pavel Machek
  0 siblings, 0 replies; 17+ messages in thread
From: Pavel Machek @ 2004-09-28  8:55 UTC (permalink / raw)
  To: Vojtech Pavlik, Erik Rigtorp, Brown, Len, ACPI Developers

Hi!

> > Yes, the question was whether it's a good idea to make them generate
> > regular key events like the normal keys on keyboard do, and I believe
> > the answer is yes.
> 
> Well, there's certainly _some_ reasoning behind the laptop keys generating
> ACPI events and not key events on some notebooks? Not that I'm aware of
> any, unfortunately...

Probably "we want these extra keys and we do not want to touch windows
keyboard handling" :-).
									Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]             ` <20040924142248.GA2593-+ZI9xUNit7I@public.gmane.org>
  2004-09-25 11:22               ` Pavel Machek
@ 2004-09-28 10:00               ` Hiroshi Miura
       [not found]                 ` <87acvak912.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
  1 sibling, 1 reply; 17+ messages in thread
From: Hiroshi Miura @ 2004-09-28 10:00 UTC (permalink / raw)
  To: Vojtech Pavlik
  Cc: Pavel Machek, Brown, Len, akpm-3NddpPZAyC0,
	erik-aH8aFkyL5XJBDgjK7y7TUQ, ACPI Developers

Hi,

At Fri, 24 Sep 2004 16:22:48 +0200,
Vojtech Pavlik wrote:
> On Fri, Sep 24, 2004 at 03:41:18PM +0200, Pavel Machek wrote:
> > Hi!
> > 
> > > There are several ways to make both the keyboard and ACPI keys work as
> > > intended:
<snip>
> > > 4) Change ACPI to use the Input API and have a daemon that handles
> > >    all extra keys, including sound volume and application keys, possibly
> > >    using D-bus to send the events to the desktop environment.
> > 
> > I like this one.
> > 

I like this one, too. But we can modify only hotkey drivers to suport it.

> > Having vol+/vol- keys would be  very welcome. This daemon would
> > have to understand scancodes for a lot of
> > different keyboards, but perhaps
> > that is easy enough to create incrementally.
> 
> The Volume+ and Volume- keys are actually pretty standardized and the
> kernel recognizes them out of the box on 95% of machines.

My new panasonic acpi hotkey driver suports Input API.
If you hit hotkey, then you can get both acpi event and hotkey event.

Acpid scirpt handle event like hibernation, video sw.
hotkey utility eg) hotkeys handles vol+/-, mute, etc.

you can get driver and hotkeys confguration from http://www.da-cha.org/letsnote/

-- 
Hiroshi Miura  --- http://www.da-cha.org/  --- miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org
NTTDATA Corp. OpenSource Software Center. --- miurahr-3MafRgGXt7BL9jVzuh4AOg@public.gmane.org 
NTTDATA Intellilink Corp. OpenSource Engineering Dev. -- miurahr-w0OK63jvRlAuJ+9fw/WgBHgSJqDPrsil@public.gmane.org
Key fingerprint = 9117 9407 5684 FBF1 4063  15B4 401D D077 04AB 8617


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]                 ` <87acvak912.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
@ 2004-09-28 10:06                   ` Pavel Machek
       [not found]                     ` <20040928100617.GB916-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  0 siblings, 1 reply; 17+ messages in thread
From: Pavel Machek @ 2004-09-28 10:06 UTC (permalink / raw)
  To: Hiroshi Miura
  Cc: Vojtech Pavlik, Brown, Len, akpm-3NddpPZAyC0,
	erik-aH8aFkyL5XJBDgjK7y7TUQ, ACPI Developers

Hi!

> > > > There are several ways to make both the keyboard and ACPI keys work as
> > > > intended:
> <snip>
> > > > 4) Change ACPI to use the Input API and have a daemon that handles
> > > >    all extra keys, including sound volume and application keys, possibly
> > > >    using D-bus to send the events to the desktop environment.
> > > 
> > > I like this one.
> > > 
> 
> I like this one, too. But we can modify only hotkey drivers to
> suport it.

I do not understand. Are there keys that can not be fit into input api? 

> > > Having vol+/vol- keys would be  very welcome. This daemon would
> > > have to understand scancodes for a lot of
> > > different keyboards, but perhaps
> > > that is easy enough to create incrementally.
> > 
> > The Volume+ and Volume- keys are actually pretty standardized and the
> > kernel recognizes them out of the box on 95% of machines.
> 
> My new panasonic acpi hotkey driver suports Input API.
> If you hit hotkey, then you can get both acpi event and hotkey event.
> 
> Acpid scirpt handle event like hibernation, video sw.
> hotkey utility eg) hotkeys handles vol+/-, mute, etc.
> 
> you can get driver and hotkeys confguration from http://www.da-cha.org/letsnote/

Where do I get "hotkeys"?
									Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]                     ` <20040928100617.GB916-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
@ 2004-09-28 12:30                       ` Hiroshi Miura
       [not found]                         ` <877jqek22r.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
  2004-09-29  4:33                       ` Hiroshi Miura
  1 sibling, 1 reply; 17+ messages in thread
From: Hiroshi Miura @ 2004-09-28 12:30 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Vojtech Pavlik, Brown, Len, akpm-3NddpPZAyC0,
	erik-aH8aFkyL5XJBDgjK7y7TUQ, ACPI Developers

Hi,

At Tue, 28 Sep 2004 12:06:18 +0200,
Pavel Machek wrote:
> 
> Where do I get "hotkeys"?

apt-get install hotkeys 
or
http://ypwong.org/hotkeys/

I'm now i18nizing and l10nizing to japanese.
And I'm extending this to support lcd brightness and battery infomation.

I will  put it up to my site soon.

-- 
Hiroshi Miura  --- http://www.da-cha.org/  --- miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org
NTTDATA Corp. OpenSource Software Center. --- miurahr-3MafRgGXt7BL9jVzuh4AOg@public.gmane.org 
NTTDATA Intellilink Corp. OpenSource Engineering Dev. -- miurahr-w0OK63jvRlAuJ+9fw/WgBHgSJqDPrsil@public.gmane.org
Key fingerprint = 9117 9407 5684 FBF1 4063  15B4 401D D077 04AB 8617


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]                         ` <877jqek22r.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
@ 2004-09-29  4:25                           ` Hiroshi Miura
  0 siblings, 0 replies; 17+ messages in thread
From: Hiroshi Miura @ 2004-09-29  4:25 UTC (permalink / raw)
  To: Hiroshi Miura
  Cc: Pavel Machek, Vojtech Pavlik, Brown, Len, akpm-3NddpPZAyC0,
	erik-aH8aFkyL5XJBDgjK7y7TUQ, ACPI Developers

Hi,

I'm uploaded  new hotkeys utility on http://www.da-cha.org/letsnote/.
(http://www.da-cha.org/letsnote/hotkeys-0.6.tar.gz)

You can try it with other machine. I want to make definition files 
for asus, ibm, and others.

> > Where do I get "hotkeys"?
> 
> apt-get install hotkeys 
> or
> http://ypwong.org/hotkeys/
> 
> I'm now i18nizing and l10nizing to japanese.
> And I'm extending this to support lcd brightness and battery infomation.

Hiroshi Miura  --- http://www.da-cha.org/  --- miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org
NTTDATA Corp. OpenSource Software Center. --- miurahr-3MafRgGXt7BL9jVzuh4AOg@public.gmane.org 
NTTDATA Intellilink Corp. OpenSource Engineering Dev. -- miurahr-w0OK63jvRlAuJ+9fw/WgBHgSJqDPrsil@public.gmane.org
Key fingerprint = 9117 9407 5684 FBF1 4063  15B4 401D D077 04AB 8617



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]                     ` <20040928100617.GB916-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  2004-09-28 12:30                       ` Hiroshi Miura
@ 2004-09-29  4:33                       ` Hiroshi Miura
  1 sibling, 0 replies; 17+ messages in thread
From: Hiroshi Miura @ 2004-09-29  4:33 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Vojtech Pavlik, Brown, Len, akpm-3NddpPZAyC0,
	erik-aH8aFkyL5XJBDgjK7y7TUQ, ACPI Developers


At Tue, 28 Sep 2004 12:06:18 +0200,
Pavel Machek wrote:
 <snip>
> > > > > 4) Change ACPI to use the Input API and have a daemon that handles
> > > > >    all extra keys, including sound volume and application keys, possibly
> > > > >    using D-bus to send the events to the desktop environment.
> > > > 
> > > > I like this one.
> > > > 
> > 
> > I like this one, too. But we can modify only hotkey drivers to
> > suport it.
> 
> I do not understand. Are there keys that can not be fit into input api? 

Yes and No. All event can fit to input api. but some of event is well handled by 
acpi event handling scheme,I think.

For example, lcd brightness control. This feature on Panasonic laptop is implemented 
on acpi dsdt, so it is derivered by hotkey driver. I think these features controled by 
acpi subsystem should handle in acpi/acpid scheme.

In my pcc_acpi driver, acpi-handler and hotkeys utility combination, 
setting values of lcd brightness is done by acpi-handler that acpid call.
And hotkeys utility displays values with reading brightness from /proc/acpi/pcc/dc_brightness.


Hiroshi Miura  --- http://www.da-cha.org/  --- miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org
NTTDATA Corp. OpenSource Software Center. --- miurahr-3MafRgGXt7BL9jVzuh4AOg@public.gmane.org 
NTTDATA Intellilink Corp. OpenSource Engineering Dev. -- miurahr-w0OK63jvRlAuJ+9fw/WgBHgSJqDPrsil@public.gmane.org
Key fingerprint = 9117 9407 5684 FBF1 4063  15B4 401D D077 04AB 8617



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

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

* Re: Re: [patch 1/1] thinkpad fn+fx key driver
       [not found]         ` <20040924134118.GA467-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>
  2004-09-24 14:22           ` Vojtech Pavlik
@ 2004-10-01 17:32           ` Stefan Seyfried
  1 sibling, 0 replies; 17+ messages in thread
From: Stefan Seyfried @ 2004-10-01 17:32 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Fri, Sep 24, 2004 at 03:41:18PM +0200, Pavel Machek wrote:
> Hi!

> > 4) Change ACPI to use the Input API and have a daemon that handles
> >    all extra keys, including sound volume and application keys, possibly
> >    using D-bus to send the events to the desktop environment.
> 
> I like this one.
> [...] 
> Hmm, the same daemon might know enough about machine's sound system
> (on notebooks for example; to be able to setup initial mixer levels.

no. This daemon would only send the dbus event for volume change, but
your mixer applet would also listen on dbus and take apropriate action.

One job - one tool. At least in this case that's IMO the way to go.
-- 
Stefan Seyfried



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

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

end of thread, other threads:[~2004-10-01 17:32 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-23  5:16 [patch 1/1] thinkpad fn+fx key driver Brown, Len
     [not found] ` <F7DC2337C7631D4386A2DF6E8FB22B300179B935-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-09-23 11:24   ` Vojtech Pavlik
     [not found]     ` <20040923112457.GB1083-+ZI9xUNit7I@public.gmane.org>
2004-09-23 12:31       ` Timo Hoenig
2004-09-24 13:41       ` Pavel Machek
     [not found]         ` <20040924134118.GA467-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>
2004-09-24 14:22           ` Vojtech Pavlik
     [not found]             ` <20040924142248.GA2593-+ZI9xUNit7I@public.gmane.org>
2004-09-25 11:22               ` Pavel Machek
     [not found]                 ` <20040925112219.GC4039-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2004-09-25 17:55                   ` Vojtech Pavlik
     [not found]                     ` <20040925175500.GA1798-+ZI9xUNit7I@public.gmane.org>
2004-09-27 13:40                       ` Randy.Dunlap
2004-09-28 10:00               ` Hiroshi Miura
     [not found]                 ` <87acvak912.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
2004-09-28 10:06                   ` Pavel Machek
     [not found]                     ` <20040928100617.GB916-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2004-09-28 12:30                       ` Hiroshi Miura
     [not found]                         ` <877jqek22r.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
2004-09-29  4:25                           ` Hiroshi Miura
2004-09-29  4:33                       ` Hiroshi Miura
2004-10-01 17:32           ` Stefan Seyfried
     [not found]         ` <1096112154.10736.10.camel@localhost.localdomain>
     [not found]           ` <1096112154.10736.10.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2004-09-25 17:56             ` Vojtech Pavlik
     [not found]               ` <20040925175618.GB1798-+ZI9xUNit7I@public.gmane.org>
2004-09-26 18:54                 ` Karol Kozimor
     [not found]                   ` <20040926185454.GA7960-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2004-09-28  8:55                     ` Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.