[PATCH] Add keyboard event addon

Matthew Garrett mjg59 at srcf.ucam.org
Sat Feb 4 03:58:00 PST 2006


Two patches attached:

1) Changes the ACPI addon to report the type of button pressed as well 
as the fact that a button has been pressed

2) Adds a keyboard addon. The included fdi file will bind it to anything 
that has type input.keyboard. It adds the capability "button" to the 
keyboard devices, and on any keypress checks the key against a table. If 
the key is found there, a ButtonPressed event is generated with the name 
of the key in the details field (one exception - KEY_SUSPEND is given 
the name "hibernate").

There's a couple of extra features that could be added (export a list of 
the available keys, for instance - not very helpful on PS/2, but useful 
on USB), but could these be applied as is for now?

Richard: this lets brightness button events be sent to g-p-m. On some 
machines, hitting the brightness button generates an event and changes 
the brightness. On other machines, hitting the brightness button only 
generates an event. This is, in general, consistent within a 
manufacturer. It would be nice if g-p-m could somehow deal with this and 
display the brightness, with it also doing the job of changing the 
brightness where necessary (Sonys are the main case where this is a 
problem)

-- 
Matthew Garrett | mjg59 at srcf.ucam.org


More information about the hal mailing list