Subject: Re: Hotkey support via powerd
To: Jared D. McNeill <>
From: Sverre Froyen <>
List: tech-kern
Date: 12/22/2007 11:34:15
On Saturday 22 December 2007, Sverre Froyen wrote:
> On Saturday 22 December 2007, Jared D. McNeill wrote:
> > On Sat, 22 Dec 2007, Sverre Froyen wrote:
> > > I can see that hardcoding the user script names could be considered
> > > awkward, however.  A slightly more general solution might be a user
> > > .powerd (.powerdrc?) user file that provides the script names.  This
> > > file could be read by the powerd scripts.  If an even more general
> > > solution is needed, perhaps powerd could be modified so that a user
> > > could register a script to be run when a button is pressed.
> >
> > Not a bad idea, but how do you know which user pressed the hotkey?
> I would leave this up to each user script.  In other words, every
> registered script would be called (for logged in users only) and it would
> be the script's responsibility to ignore events that it did not care about.

If the userid of the keyboard owner could be determined and passed to the 
script, that might simplify this process.