Extra keyboard buttons (hotkey-setup)

David Zeuthen david at fubar.dk
Thu May 3 10:56:25 PDT 2007


Hi,

On Thu, 2007-05-03 at 02:29 +0100, Paul Sladen wrote:
> On Tue, 1 May 2007, David Zeuthen wrote:
> > I think it makes sense; but before committing it you should probably
> > check with the maintainers of Ubuntu's hotkey-setup that a) they're fine
> > with us using this data;
> 
> I am fine with the data being used.
> 
> > b) are fine with switching to HAL
> 
> As long as it doesn't regress in usefulness.  I wouldn't want to ship
> something only containing numbers---and preferably I'd like something that
> users can easily edit and test examplar patches for their machine (including
> being able to init.d "stop" and get their boot-time keymap back).

Well, I object to using symbolic constants just because it's easier to
edit fdi files for human beings. First of all, if the user is capable of
finding the file, he should be able to read a comment in the file saying
that he needs to look at input.h for the keycode. I think that's a fair
assumption.

Second of all, people should never write XML files themselves. I'm
obviously biased, being a software developer and all, but editing XML
files is teh suck; at least that's my opinion. I'd rather we built
software on top that helps the user do what he wants - which is to make
their hotkeys work and contribute that back to us so we can merge it
into hal-info. 

If you think about it, writing such a small tool that does this wouldn't
take long; it doesn't have to be a UI tool or anything; perhaps just a
small command line app like e.g. hal-disable-polling:

http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=c003685ace0936d4c813bf1ba422d521c72d4d62

Or it could be a plug-in to gnome-device-manager so it all happens
graphically [1]. Either way, that's a much better idea that going for an
easy route that doesn't buy you much _anyway_; e.g. the main point here
is that if the user can find the XML file he can also read+understand
the comment that it needs to be an integer keycode, not a symbolic
constant.

For upgrade paths and others, you can of course have a program that
converts the users settings into an fdi file.

Does this make sense?

      David

[1] : am planning to do that to collect data at least for all these Nin1
card readers; it will then write the file out to

 /etc/hal/fdi/information 

and also give the user some data he can file at bugs.fd.org - maybe even
use some of the GNOME bugbuddy code to do this automatically etc. etc. I
think that's compelling.




More information about the hal mailing list