[RFC] Keymapping thoughts (or, can we avoid some copy and pasting?)
Carlos Corbacho
carlos at strangeworlds.co.uk
Sat Mar 15 02:35:15 PDT 2008
Hello all,
Working on the Acer .fdi file lately, I've noticed that it does seem to be
getting a bit out of hand lately - I find myself copying + pasting a lot of
the same things to generate the entries, when really, lots of the available
keys are identical (e.g. having to copy a whole entry ad-verbatim simply
because the series differs, or minor differences between models).
What I'd like to see is something like being able to define some groups of
keymappings, give them a unique name, and then assign these groups to the
matching statements instead of copying + pasting all the individual keys.
e.g. (bad examples coming up)
So, for example, I'd define a group for the extra Euro & Dollar keys on Acer
laptops in the Acer .fdi, and call it 'acer_currency'.
<keygroup string="acer_currency">
<append key="input.keymap.data" type="strlist">e033:euro</append>
<append key="input.keymap.data" type="strlist">e034:dollar</append>
</keygroup>
And then, if I wanted to include those extra keys, do something like this:
<match key="/org/freedesktop/Hal/devices/computer:system.hardware.product"
contains_outof="5020">
<append keygroup="acer_currency" />
</match>
-Carlos
--
E-Mail: carlos at strangeworlds.co.uk
Web: strangeworlds.co.uk
GPG Key ID: 0x23EE722D
More information about the hal
mailing list