• Olá Visitante, se gosta do forum e pretende contribuir com um donativo para auxiliar nos encargos financeiros inerentes ao alojamento desta plataforma, pode encontrar mais informações sobre os várias formas disponíveis para o fazer no seguinte tópico: leia mais... O seu contributo é importante! Obrigado.

AZBox Premium - Remote Controls Codes

aguda

GF Ouro
Entrou
Ago 28, 2007
Mensagens
19,102
Gostos Recebidos
2
AZBox Premium - Remote Controls Codes

Using my old IR receiver with Girder application I managed to get remote codes for AZBox Premium remote control.

Below is list of buttons with the remote control codes (TV buttons have specific codes for my TV - Sony):

"TV/AUX" "PLM:4A00"
"STB POWER" "NEC:73FA-80"
"TV MUTE" "PLM:2900"
"TV VOL +" "PLM:4900"
"TV POWER" "PLM:A900"
"TV CH +" "PLM:0900"
"TV VOL -" "PLM:9200"
"TV CH -" "PLM:8900"
"WWW" "NEC:73FA-41"
"E-MAIL" "NEC:73FA-C1"
"YOUTUBE" "NEC:73FA-81"
"VOL +" "NEC:73FA-C2"
"HOME" "NEC:73FA-40"
"CH +" "NEC:73FA-02"
"VOL -" "NEC:73FA-42"
"INFO" "NEC:73FA-06"
"CH -" "NEC:73FA-82"
"|<<" "NEC:73FA-66"
"<<" "NEC:73FA-1E"
"> >" "NEC:73FA-9E"
"> > |" "NEC:73FA-01"
"REC" "NEC:73FA-C0"
"STOP" "NEC:73FA-54"
"PAUSE" "NEC:73FA-D4"
"MUTE" "NEC:73FA-A2"
"MENU" "NEC:73FA-E2"
"CHECK" "NEC:73FA-EE"
"UP" "NEC:73FA-92"
"LEFT" "NEC:73FA-D2"
"OK" "NEC:73FA-62"
"RIGHT" "NEC:73FA-32"
"DOWN" "NEC:73FA-52"
"GUIDE" "NEC:73FA-6E"
"EXIT" "NEC:73FA-72"
"TV/RADIO" "NEC:73FA-46"
"SEARCH" "NEC:73FA-26"
"RESOLUTION" "NEC:73FA-C6"
"SUB-T (RED)" "NEC:73FA-4E"
"TEXT (GREEN)" "NEC:73FA-CE"
"LANG (YELLOW)" "NEC:73FA-2E"
"I-KEY (BLUE)" "NEC:73FA-AE"
"USB" "NEC:73FA-B2"
"UHF" "NEC:73FA-A6"
"AUX" "NEC:73FA-86"
"1" "NEC:73FA-84"
"2" "NEC:73FA-44"
"3" "NEC:73FA-C4"
"4" "NEC:73FA-24"
"5" "NEC:73FA-A4"
"6" "NEC:73FA-64"
"7" "NEC:73FA-E4"
"8" "NEC:73FA-14"
"9" "NEC:73FA-94"
"DEL\BACK" "NEC:73FA-0E"
"0" "NEC:73FA-04"
"CAPS/NUM" "NEC:73FA-8E"

gracias a melqug
 

aguda

GF Ouro
Entrou
Ago 28, 2007
Mensagens
19,102
Gostos Recebidos
2
This is what I could find about the keymap.xml structure.
It tells me the remote control codes are actually defined somewhere else in enigma, and this might be the best place to search for improvements.


Keymap.xml is the file in which we define for example for plugins which action-name will be started when pressing a certain button.
When opening the keymap.xml file, you can recognize repeating blocks like this:

Código:
<map context="MediaPlayerActions">
   <device name="dreambox remote control (native)">
      <key id="KEY_YELLOW" mapto="pause" flags="m" />
      <key id="KEY_GREEN" mapto="play" flags="m" />
      <key id="KEY_TV" mapto="stop" flags="b" />
      <key id="KEY_TV" mapto="shift_stop" flags="l" />
      <key id="KEY_RADIO" mapto="shift_record" flags="l" />
      <key id="KEY_PREVIOUS" mapto="previous" flags="m" />
      <key id="KEY_NEXT" mapto="next" flags="m" />
   </device>
</map>

The first line contains a the specific block-name, which cannot be repeated.
Código:
<map context="meinPluginActions">

In the second line the device is specified from which the key-press is expected. This can be the remote control, the extended remote control or a keyboard. This is an overview of the three devices:
Código:
<device name="dreambox remote control (native)">
<device name="dreambox advanced remote control (native)">
<device name="dreambox ir keyboard">

After this, the individual keys are defined. With the example above these are:
Código:
       <key id="KEY_YELLOW" mapto="pause" flags="m" />
key id="KEY_YELLOW" resembles the yellow key on the remote control. The key codes are defined internally in Enigma.
mapto="pause" means that the yellow key triggers the pause action.
flags="m" indicates which kind of key press is expected,
The flags can be

m = make -> Normal key press
l = long -> Long key press
b = break -> Key released
r = repeat -> Key locked (pressed continuously)

"m" arrives once, as soon as the key is pressed
"r" arrives after "m", when the key is pressed continuously until the key is released
"l" arrives after 5 repeats, but then only once (repeat still arrives)
"b" arrives as soon as the key is released.
They can also be combine, eg. flags="mr"

If a windows is for example opened with "m", you cannot use r/l/b for this key in the same context. Therefore it's better to open the dialog with "b".

Our own example currently looks like this:
Código:
<map context="meinPluginActions">
   <device name="dreambox remote control (native)">
      <key id="KEY_YELLOW" mapto="action1" flags="m" />
      <key id="KEY_YELLOW" mapto="action2" flags="l" />
   </device>
</map>

To activate the functions of the standard key-functions and specific functions defined here, an import to the program has to be done, similar to this:

Código:
from Components.ActionMap import NumberActionMap, ActionMap

Furthermore, the single functions are assigned to the keys in the program:
Código:
self["actions"] = ActionMap(["meinPluginActions"],
  {
     "action1": self.erstes,
     "action2": self.zweites,
  }, -1)

Of course the fitting code for executing the actions will have to be create as well:
Código:
 def erstes(self):
     do this and that
 def zweites(self):
     do something else

This results in the following: A normal keypress on the yellow key starts programpart "erstes", when pressing the yellow key for a long time, the programpart "zweites" is started

gracias a rtificial
 
Topo