> I was gonna do this but decided to try to create my own as Oliver
> suggested but now I realize I still do not understand how hal behaves. I
> created a new file where Oliver suggested but I think the original
> location
> /usr/share/hal/fdi/information/10freedesktop/30-keymap-misc.fdi is
> overwriting it. I include that file below.

It looks like you had the right general idea, but you had a mistake in
your XML file:  you were didn't include the match for the vendor, but you
did have a closing </match> for it, which caused the XML to not parse.  A
corrected version of the XML is below.  I also changed the key codes from
106, 108, etc to the more human readable right, down, etc.

> Out of curiosity,  how does one know the "e056" type of information and
> the associated numbers? I know of "xev" but the numbers that it returns do
> no match those you list. Neither do they seem to match the standard codes
> for "up arrow" and such. Please excuse my ignorance :)
>

The e056 is the key scan code.  If the kernel doesn't understand a scan
code, it logs a message that you can see in dmesg saying so and tells you
the code.  If you have a device that has a button that isn't doing
anything, you can take a peek in dmesg and see if the scan code is not
being recognized, then map it setkeycodes, or through hal-info now. 
Alternatively you can use showkey to display the scan codes as you press
keys, but I don't think this works under X.  As for the 106, 108, etc (key
codes) , those are defined in /usr/include/linux/input.h, or someone has
made a web page of most of the keys here:
http://www.comptechdoc.org/os/linux/howlinuxworks/linux_hlkeycodes.html

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">
  <device>

      <match
key="/org/freedesktop/Hal/devices/computer:system.hardware.vendor"
prefix_ncase="samsung">
        <!-- Samsung Q1 Ultra -->
        <match
key="/org/freedesktop/Hal/devices/computer:system.hardware.product"
string="SQ1US">
          <append key="input.keymap.data"
type="strlist">e054:menu</append> <!-- Menu: mute -->
          <append key="input.keymap.data" type="strlist">e058:up</append>
<!-- Up arrow: mute -->
          <append key="input.keymap.data"
type="strlist">e059:right</append> <!-- Right arrow: mute -->
          <append key="input.keymap.data"
type="strlist">e056:down</append> <!-- Down arrow: mute -->
          <append key="input.keymap.data"
type="strlist">e057:left</append> <!-- Left arrow: mute -->
          <append key="input.keymap.data" type="strlist">e064:f5</append>
<!-- Shutter key: mute -->
          <append key="input.keymap.data" type="strlist">e06e:f11</append>
<!-- UDF key: mute -->
          <append key="info.capabilities"
type="strlist">input.keymap</append>
        </match>
      </match>

    </device>
</deviceinfo>




-- 
Ubuntu-mobile mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile

Reply via email to