Skip navigation

Sendqtevent utility is located in STB RootFS. Location path for various STB models:

  • /usr/share/qt-4.6.0/ - for MAG250/254
  • /usr/local/share/app/bin - for MAG256/322/324/349/351/420/424

Running sendqtevent in OS shell (access to STB by SSH) you can emulate keystroking of STB remote controller and additional operations

Command format for calling utility

Format for call utility:
sendqtevent [-c] [-a] [-s] [-ks <code>] [-kqt <qt_code>]
-c  - CTRL key modifier
-a  - ALT key modifier
-s  - SHIFT key modifier
<code> - KeySym code (default: 0x20)
<qt_code> - code for Qt symbol (e.i. Qt::Enter)
code - matches codes KeySym:<code> in settings LIRC /etc/lirc/lircrc
qt_code - matches code button from Qt::Key

Note. There is a restriction - KB (virtual keyboard) and Settings keys can't be emulated through this utility.

Running command on example of MAG250/254

To run the utility use the next format: /usr/share/qt-4.6.0/sendqtevent <Parameters> For example to emulate left key use next command: /usr/share/qt-4.6.0/sendqtevent -kqt 0x01000012 -ks 0x25

where:
0x01000012 - Qt::Key_Left from: http://qt-project.org/doc/qt-4.8/qt.html#Key-enum
0x25 - keyCode value (hex) for Left key from: JS_API_MAG200_(Rev_1.20).pdf page 103

Note:
For some control keys like menu that are not present in QT namespace (file qt.html) you need to look in lircrc.wk file (location path: /etc/lirc/lircrc.wk) - config=Key ctrl-F11 Web
For this key you need to use code 0x0100003a corresponded F11 key from http://qt-project.org/doc/qt-4.8/qt.html#Key-enum and flag -c (CTRL key modifier)

Command examples

MAG250/254

Use next format of command: /usr/share/qt-4.6.0/sendqtevent <Parameters>

Example of running Info button for MAG250/254: /usr/share/qt-4.6.0/sendqtevent -a -kqt 0x00000059 -ks 0x59

MAG256/3xx/4xx

Use next format of command: /usr/local/share/app/bin/sendqtevent <Parameters>

Example of running Exit button for MAG256/3xx/4xx:
/usr/local/share/app/bin/sendqtevent -kqt 0x01000000

Note: To forward codes in S1 mode for Linux STB MAG4xx and above you must set the Bootloader variable - allRcCodesS1=true
fw_setenv allRcCodesS1 true


Parameters for various commands

Key, operation Parameter value Comment
Vol- -kqt 0x01000070 -kqt 0x2d for MAG250/254 only
Vol+ -kqt 0x01000072 -kqt 0x2b for MAG250/254 only
mute -kqt 96 -a
-kqt 126 -a

menu -kqt 0x0100003a
left -kqt 0x01000012
right -kqt 0x01000014
up -kqt 0x01000013
down -kqt 0x01000015
ok

-kqt 0x01000004
-kqt 0x01000005


red -kqt 0x01000030
green -kqt 0x01000031
yellow -kqt 0x01000032
blue -kqt 0x01000033
0 -kqt 48
1 -kqt 49
2 -kqt 50
3 -kqt 51
4 -kqt 52
5 -kqt 53
6 -kqt 54
7 -kqt 55
8 -kqt 56
9 -kqt 57
power

-kqt 85 -a
-kqt 0x55 -a


ch+ -kqt 0x01000001
ch- -kqt 0x01000002
refresh -kqt 0x01000034
exit -kqt 0x01000000
back -kqt 0x01000003
page up -kqt 0x01000016 additional operation
page down -kqt 0x01000017 additional operation
info -kqt 89 -a
play/pause -kqt 82 -a
stop

-kqt 83 -a


Screen resize -kqt 0x01000035
EPG -kqt 0x01000037
tv -kqt 0x01000039
Need Help

Dave is an expert on the MAG STB and the author of this article.

Was this article helpful?

Yes No

Sorry to hear that.
How can we improve this article?

We use cookies in order to optimise our website, provide you with the best possible user experience and help us promote our products. Please read our Cookie Policy to find out how we use cookies and how you can control cookies.
By using this website or closing this message, you acknowledge our Privacy Policy and agree to our use of cookies as described in our Cookie Policy.