Hardkey And Button Mapping

From LinuxMCE
Jump to: navigation, search


To do key mapping, this must be done on a per orbiter basis.

Web Admin > Advanced > Devices > Select the orbiter you wan to change.

Now... Find the Hard Keys devicedata, notice there is a list of numbers in this field. Separated by tabs.

b    0    d      m      c       (p1    p2    p3....)

These are separated by tab, and are set as follows:

  • b = PK_Button, do a select * from Button to get a list of buttons that you can map.
  • 0 = this is typically always 0.
  • d = The target device. select * from DeviceTemplate WHERE PK_DeviceTemplate < 0;
  • m = Messagetype, this is 1 for command, 2 to send an event. If you use 2, the d = -1001 for the virtual event device.
  • c = The Command to send, select * from Command, to get a list of all the command numbers.

The rest of the parameters are a parameter, value pair. Look at each command in the Web Admin > Advanced > DCE > Commands, to see the commands, their parameter numbers, and what values they can take.

In short, it's like MessageSend, look at the MessageSend command.

the most common devices to use here are

  • -106 = The Media Plugin, anything going here will be delegated to the current media player.
  • -300 = The Orbiter, anything going here, will be sent to the local orbiter.