Kodi Community Forum

Full Version: [T3] 2.4GHz and IR Air Mouse Remote Control
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
(2017-01-12, 22:16)dasco Wrote: [ -> ]Hi Jeffers24,

Some more thoughts on your mapping issues
Quote:< key id="53263">runaddon(plugin.program.chrome.launcher)</key> "Mail / Envelope Button", may be my ignorance, on Android took me to Gmail, rather than chrome browser?
Chrome Launcher is another Kodi AddOn that needs to be installed. I believe Chrome Launcher is only available on Windows/Linux and OSX. http://forum.kodi.tv/showthread.php?tid=170965

Quote:<key id="61656">ShowVideoMenu</key> "Four Lines Button", on Android no action should "ShowVideoMenu" be "showvideoinfo"?
This is for bringing up the menu at the start of a DVD. ie to select which episode to watch or song to play in a music DVD. For this to work your videos need to be ripped including the menus. and i believe "iso" images are only supported.

Quote:< key id="53255">ActivateWindow(Home)</key> "Home Button", on Android the Home button takes me to the Android home screen, not the Kodi Home screen?
Can you try this on a known key id. ie your stop button/magnify Glass Key ID.

I don't have chrome launcher addon installed so that could explain why the envelope key does not install chrome, interesting that it appears to default in my case to gmail.

I don't play DVDs so that would explaine why ShowVideoMenu has no effect for me.

ActivateWindow(Home) works on my WIN10 laptop, goes to the Kodi home screen. But doesn't work on my Android box, goes to Android home screen. Tried to use Key Editor Addon to find out Home key code, BUT when in Key Editor and I press the Home Key on my T3 as the key I want to map immediately goes to the Android home screen. So I can't tell you the code the key is generating, but may assume it's the code in your keymap as it works on WIN10.
(2017-01-13, 07:17)Jeffers24 Wrote: [ -> ]Dasco,

Using the Kodi Keymap Addon appears to be a bit long winded to me as I think I have to go through the motions of editing an option and all the preceding steps to see what code a key press generates.

Rather than use the Kodi Keymap Addon, could I use your showkey.exe to see what codes my T3 generates for each of the key presses?

I have downloaded showkey from your Google drive and have it running, only problem is when I press a key it does display key details but not the 5 digit numeric key codes as per your keymap, how do I convert what showkey displays to the required 5 digit numeric key id?

Keymap Editor generates the 5 digit numeric number that kodi recognises. This should be consistant with Show Key that displays the Virtual Key Code. If you could check just the home button on Keymap Editor and Showkey this should confirm that Android uses the same 5 digit numbers as i have detailed in the spreadsheet.
Show key will display the virtual key code something like this. For the letter "L" in the KeyID section "76 (0x4C) - VK_L". The Virtual keycode is the 4C in the bracket ie "VK4C"
(2017-01-13, 08:43)dasco Wrote: [ -> ]
(2017-01-13, 07:17)Jeffers24 Wrote: [ -> ]Dasco,

Using the Kodi Keymap Addon appears to be a bit long winded to me as I think I have to go through the motions of editing an option and all the preceding steps to see what code a key press generates.

Rather than use the Kodi Keymap Addon, could I use your showkey.exe to see what codes my T3 generates for each of the key presses?

I have downloaded showkey from your Google drive and have it running, only problem is when I press a key it does display key details but not the 5 digit numeric key codes as per your keymap, how do I convert what showkey displays to the required 5 digit numeric key id?

Keymap Editor generates the 5 digit numeric number that kodi recognises. This should be consistant with Show Key that displays the Virtual Key Code. If you could check just the home button on Keymap Editor and Showkey this should confirm that Android uses the same 5 digit numbers as i have detailed in the spreadsheet.
Show key will display the virtual key code something like this. For the letter "L" in the KeyID section "76 (0x4C) - VK_L". The Virtual keycode is the 4C in the bracket ie "VK4C"

Our posts crossed.

From my previous post:-

ActivateWindow(Home) works on my WIN10 laptop, goes to the Kodi home screen. But doesn't work on my Android box, goes to Android home screen. Tried to use Key Editor Addon to find out Home key code, BUT when in Key Editor and I press the Home Key on my T3 as the key I want to map immediately goes to the Android home screen. So I can't tell you the code the key is generating, but may assume it's the code in your keymap as it works on WIN10.
(2017-01-13, 08:17)Jeffers24 Wrote: [ -> ]
(2017-01-12, 22:16)dasco Wrote: [ -> ]Hi Jeffers24,

Some more thoughts on your mapping issues
Quote:< key id="53263">runaddon(plugin.program.chrome.launcher)</key> "Mail / Envelope Button", may be my ignorance, on Android took me to Gmail, rather than chrome browser?
Chrome Launcher is another Kodi AddOn that needs to be installed. I believe Chrome Launcher is only available on Windows/Linux and OSX. http://forum.kodi.tv/showthread.php?tid=170965

Quote:<key id="61656">ShowVideoMenu</key> "Four Lines Button", on Android no action should "ShowVideoMenu" be "showvideoinfo"?
This is for bringing up the menu at the start of a DVD. ie to select which episode to watch or song to play in a music DVD. For this to work your videos need to be ripped including the menus. and i believe "iso" images are only supported.

Quote:< key id="53255">ActivateWindow(Home)</key> "Home Button", on Android the Home button takes me to the Android home screen, not the Kodi Home screen?
Can you try this on a known key id. ie your stop button/magnify Glass Key ID.

I don't have chrome launcher addon installed so that could explain why the envelope key does not install chrome, interesting that it appears to default in my case to gmail.

I don't play DVDs so that would explaine why ShowVideoMenu has no effect for me.

ActivateWindow(Home) works on my WIN10 laptop, goes to the Kodi home screen. But doesn't work on my Android box, goes to Android home screen. Tried to use Key Editor Addon to find out Home key code, BUT when in Key Editor and I press the Home Key on my T3 as the key I want to map immediately goes to the Android home screen. So I can't tell you the code the key is generating, but may assume it's the code in your keymap as it works on WIN10.

Might have to map the Home function to another button if Android wont let you change the Home button.

This may work for Android

<keymap>
<global>
<appcommand>
<browser_home>ActivateWindow(Home)</browser_home>
</appcommand>
</global>
</keymap>
Looking at purchasing one of these (assume this is the one on eBay: http://www.ebay.co.uk/itm/271122533550 ?), I have no use for the air-mouse facility which I understand can be switched off, can someone confirm that it mainly works out the box under Linux/LE maybe requiring a few keymap changes? Also, if I understand correctly it can be programmed to replace the IR TV remote as well?
(2017-01-13, 10:58)ShinyAndy Wrote: [ -> ]Looking at purchasing one of these (assume this is the one on eBay: http://www.ebay.co.uk/itm/271122533550 ?), I have no use for the air-mouse facility which I understand can be switched off, can someone confirm that it mainly works out the box under Linux/LE maybe requiring a few keymap changes? Also, if I understand correctly it can be programmed to replace the IR TV remote as well?

Hi ShinyAndy,

The link provided is the correct remote. Air mouse can be switched off and permanently stays off until switched back on. Linux i cannot answer, but there has been a few posts confirming remote working on Linux/LE. Yes the front face of remote all buttons can be programmed for IR use, by pressing the TV button on the remote will toggle between IR and RF its either one or the other and not both at the same time. When in IR mode LED blinks red, when in RF mode LED blinks green.
Excellent, many thanks
dasco thanks for answer
I have another quastion: can i teach the browser button to open Google Chrome, when KODI is open? (i mean not kodi addon, but windows applocation)
(2017-01-13, 06:57)dasco Wrote: [ -> ]
(2017-01-12, 22:07)gibxxi Wrote: [ -> ]Hi Dasco,

Care to enlighten me on what your using AHK for with this remote control and/or share your AHK config for pointers so I can set up my own preferences? I've never used it, although I think Kodi Launcher addon makes use of it in some way, or was built using it. I may have my wires crossed here. I'd like to map the key on the remote that looks somewhat like the Windows logo from StarDock's Start10 "Echo" theme to the real Windows key if possible, as pressing it doesn't seem to do anything currently.


Hi gibxxi

To get started with AHK downlod the file from my Google Drive it contains a copy of AutoHotKey, ShowKey, ShowKey AHK and Excel spreadsheet of the Virtual keycodes for Windows, T3 and MX3 Remote.

https://drive.google.com/drive/folders/0...sp=sharing

Step 1 install AutoHotKey onto your machine.
Step 2 Open up notepad and start creating your script or copy and paste mine and modify for yourself.


vk76::Run nircmd.exe cdrom open D: ;Blue Button open DVD Drawer
vkff::vk5b ; Changes four square button or Windows Button on T3 remote to Windows Button requested by gibxxi

#ifwinActive ahk_class Chrome_WidgetWin_1 ;following items active in Chrome only
vkb1::!left ;Turns Air Mouse [|<<] button into Browser Back
vkb0::!Right ;Turns Air Mouse [|>>] button into Browser Forward
vk71::f3 ;Turns Air mouse "Four Squares" Modified Kodi search Button into Search Button for Chrome
vk72::^w ;Turns Air Mouse Modified Stop Key into Close Chrome

#IfWinActive, Netflix ;Following Items active in Netflix only
RButton::Backspace ;Allows pressing right mouse button on remote to go back in Netflix

#ifwinActive,Kodi ;following items active in Kodi Only
vkad::vk77 ;Changes Mute to F8 Kodi Mute
vkae::vkbd ;Changes Volume Down to "-" Kodi Volume Down
vkaf::vkbb ;Changes Volume Up to "+" Kodi Volume Up

Step 3 When you have created your script save your notepad file with the Extension ".ahk". ie "gibxxi script.ahk"
Step 4 Test script by double clicking.
Step 5 Right mouse click on your newly created script and select compile script. This turns your script into an executable file.
Step 6 Place compiled script into your startup folder (C: > Users >"Your Computer Name" > AppData > Roaming > Microsoft > Windows > Start Menu >Programs >Startup)

The possibilities with AHK are almost endless the above script is only one i use but should give you a starting point.

The Excel File contains all the Virtual Key codes you will need to change button to what ever you want them to be.

I use AHK scripts to give the remote functionality when in Chrome, Netflix, Kodi or what ever program you want.

Many thanks for this. Will have a play on my days off.

Smile

Gib.
(2017-01-14, 11:35)miscalin Wrote: [ -> ]dasco thanks for answer
I have another quastion: can i teach the browser button to open Google Chrome, when KODI is open? (i mean not kodi addon, but windows applocation)

HI Miscalin,
Since you use the Measy GP811 this is a different remote to the T3 so information in this thread may not apply to you.
on the T3 the Browser key does not have any recognisable code in Windows and cannot be mapped.
You could try using ShowKey to see if your remote registers a key press on your browser button.
You can use a remote button to open Chrome when Kodi is open. However the most convenient way of doing this is using the "Chrome Launcher" Add On ̶a̶s̶ ̶t̶h̶i̶s̶ ̶L̶a̶u̶n̶c̶h̶e̶r̶ ̶t̶a̶k̶e̶s̶ ̶c̶a̶r̶e̶ ̶o̶f̶ ̶a̶l̶l̶ ̶t̶h̶e̶ ̶f̶o̶c̶u̶s̶i̶n̶g̶ ̶i̶s̶s̶u̶e̶s̶ ̶y̶o̶u̶ ̶w̶i̶l̶l̶ ̶c̶o̶m̶e̶ ̶a̶c̶r̶o̶s̶s̶.̶
http://forum.kodi.tv/showthread.php?tid=170965
̶K̶o̶d̶i̶ ̶l̶i̶k̶e̶s̶ ̶t̶o̶ ̶s̶t̶a̶y̶ ̶i̶n̶ ̶f̶o̶c̶u̶s̶ ̶a̶n̶d̶ ̶w̶i̶l̶l̶ ̶s̶t̶e̶a̶l̶ ̶f̶o̶c̶u̶s̶ ̶f̶r̶o̶m̶ ̶y̶o̶u̶r̶ ̶C̶h̶r̶o̶m̶e̶ ̶B̶r̶o̶w̶s̶i̶n̶g̶ ̶i̶f̶ ̶y̶o̶u̶ ̶d̶o̶ ̶n̶o̶t̶ ̶h̶a̶v̶e̶ ̶o̶t̶h̶e̶r̶ ̶s̶c̶r̶i̶p̶t̶s̶ ̶i̶n̶ ̶p̶l̶a̶y̶ ̶t̶o̶ ̶s̶t̶o̶p̶ ̶K̶o̶d̶i̶ ̶s̶t̶e̶a̶l̶i̶n̶g̶ ̶f̶o̶c̶u̶s̶
Launcher4Kodi was running in the background stealing the focus for Kodi.
A simple AHK Script could Launch Chrome from a button on your remote. An example of mapping the red button to launch Chrome would be

vk73::
Run, chrome.exe
WinWaitActive, ahk_class Chrome_WidgetWin_0,, 2
#ifwinActive ahk_class Chrome_WidgetWin_1 ;following items active in Chrome only
vkb1::!left ;Turns Air Mouse [|<<] button into Browser Back
vkb0::!Right ;Turns Air Mouse [|>>] button into Browser Forward
vk72::^w ;Turns Air Mouse Modified Stop Key into Close Chrome
return
Image

what code is "recent" button?
(2017-01-15, 11:54)Flest Wrote: [ -> ]Image

what code is "recent" button?

Using Windows there is no recognised code in RF mode. If using IR button can be used.
Hi,

I recently took the plunge and bought 2 of these (eBay link in post #115) for use on my 2 Linux-based systems, one of which is a RPi2 running Openelec, and the other runs Ubuntu (on an Acer Revo net top).

For those interested in how this works on Linux, I can confirm that behaviour is generally good and in line with what other have said on this forum. I've done a few keymap changes to get quick access to the EPG, force FullScreen (tab key), etc. and have achieved a fairly good setup. One tip for those not used to the lack of a "Stop" button (me included), the approach I took is to use the "longpress" modifier to allow holding down the Play/Pause button to stop what is playing, e.g. (from memory, excuse typos):

<play_pause mod="longpress">Stop</play_pause>

In fact, I've made quite a bit of use of this longpress modifier to "double" up some buttons - for example holding down the "Home" or "Escape" keys forces FullScreen instead of Home/Back, and holding down Pg+ goes up to Parent level in folders. All works quite well, from my perspective at least ;o)

One thing to note is that the actual key names as identified by Kodi (from log with debug on) are actually different on the 2 (Linux) systems, for example on Openelec the Home button is "homepage" but on Ubuntu it seems to be "browser_home" (from memory again). Also, a few of the keys appear to be unsupported/recognised in 1 of 3 different ways:

1) No reaction from Kodi debug log at all
2) Kodi debug log shows there is no mapping - something like an XBMCK_UNKNOWN error
3) Kodi debug log shows the key is interpreted as "0" (only happens on Ubuntu), which then can't be mapped in keymap because "0" is not a valid XML element name!

The actual unsupported keys, and the way in which they don't work (one of the 3 above) is different for each system, but in general the following keys don't work:

Zoom In (2nd row)
Zoom Out (2nd row)
Recent/2 rectangles (3rd row)
4 rectangles (above Explorer button)
Explorer (only doesn't work on RPi/Openelec from memory)

Does anyone know if there is any way on Linux to get these keys recognised as *something*, even if they are mapped through to different/other key names that are recognised by Kodi (but don't exist on this remote). I'm assuming this is all handled outside of Kodi and part of the OS, but haven't had chance to explore in detail yet. It would be great to make use of these final few keys.
Ok, bit of an update that may possibly help to contribute to getting the unrecognised keys on the T3 remote recognised in Linux.

Firstly, so far this has all been on my Openelec RPi2...

From reading on t'internet, I found I could use a tool called evtest to find out the scancodes for the buttons, but couldn't get this working on Openelec, so I migrated over to Libreelec and installed their system tools addon, which gave me evtest, and found me some more info on the buttons:

Code:
4 rectangles:
Event: time 1484862141.061309, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7008a
Event: time 1484862141.061309, type 1 (EV_KEY), code 92 (KEY_HENKAN), value 1
Internet Explorer
Event: time 1484862204.261669, type 4 (EV_MSC), code 4 (MSC_SCAN), value c008a
Event: time 1484862204.261669, type 1 (EV_KEY), code 150 (KEY_WWW), value 1
Zoom in:
Event: time 1484862205.813901, type 4 (EV_MSC), code 4 (MSC_SCAN), value c022d
Event: time 1484862205.813901, type 1 (EV_KEY), code 418 (KEY_ZOOMIN), value 1
Zoom out:
Event: time 1484862206.245953, type 4 (EV_MSC), code 4 (MSC_SCAN), value c022e
Event: time 1484862206.245953, type 1 (EV_KEY), code 419 (KEY_ZOOMOUT), value 1
Recent/2 rectangles:
Event: time 1484862247.603470, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700bb
Event: time 1484862247.603470, type 1 (EV_KEY), code 240 (KEY_UNKNOWN), value 1

A bit more reading suggested I could drop a customer hwdb file so after finding (I think) the usb kernel modalias for the remote using:

Code:
udevadm info /dev/input/event0

..I created a hwdb file called "99-t3remote.hwdb" in ~/.config/hwdb.d/ directory:

Code:
# T3 Remote
keyboard:usb:v25A7p2402*
KEYBOARD_KEY_07008a=f8                                  # 4 Rectangles
KEYBOARD_KEY_0c008a=f9                                  # Internet Explorer
KEYBOARD_KEY_0c022d=f10                                 # Zoom In
KEYBOARD_KEY_0c022e=f11                                 # Zoom Out
KEYBOARD_KEY_0700bb=f12                                 # Recent

...which was an attempt to map the keys to something that I hoped Kodi would see - i.e. the F8 to F12 keys.

Unfortunately this doesn't seem to have worked and Kodi log still reports the same thing:

Code:
DEBUG: CLinuxInputDevice::KeyEvent: TranslateKey returned XBMCK_UNKNOWN from code(92)

Anyone got any more experience/knowledge in this area and can say if I'm getting close?
(2017-01-19, 15:16)julianmclean Wrote: [ -> ]Hi,

I recently took the plunge and bought 2 of these (eBay link in post #115) for use on my 2 Linux-based systems, one of which is a RPi2 running Openelec, and the other runs Ubuntu (on an Acer Revo net top).

For those interested in how this works on Linux, I can confirm that behaviour is generally good and in line with what other have said on this forum. I've done a few keymap changes to get quick access to the EPG, force FullScreen (tab key), etc. and have achieved a fairly good setup. One tip for those not used to the lack of a "Stop" button (me included), the approach I took is to use the "longpress" modifier to allow holding down the Play/Pause button to stop what is playing, e.g. (from memory, excuse typos):

<play_pause mod="longpress">Stop</play_pause>

In fact, I've made quite a bit of use of this longpress modifier to "double" up some buttons - for example holding down the "Home" or "Escape" keys forces FullScreen instead of Home/Back, and holding down Pg+ goes up to Parent level in folders. All works quite well, from my perspective at least ;o)

One thing to note is that the actual key names as identified by Kodi (from log with debug on) are actually different on the 2 (Linux) systems, for example on Openelec the Home button is "homepage" but on Ubuntu it seems to be "browser_home" (from memory again). Also, a few of the keys appear to be unsupported/recognised in 1 of 3 different ways:

1) No reaction from Kodi debug log at all
2) Kodi debug log shows there is no mapping - something like an XBMCK_UNKNOWN error
3) Kodi debug log shows the key is interpreted as "0" (only happens on Ubuntu), which then can't be mapped in keymap because "0" is not a valid XML element name!

The actual unsupported keys, and the way in which they don't work (one of the 3 above) is different for each system, but in general the following keys don't work:

Zoom In (2nd row)
Zoom Out (2nd row)
Recent/2 rectangles (3rd row)
4 rectangles (above Explorer button)
Explorer (only doesn't work on RPi/Openelec from memory)

Does anyone know if there is any way on Linux to get these keys recognised as *something*, even if they are mapped through to different/other key names that are recognised by Kodi (but don't exist on this remote). I'm assuming this is all handled outside of Kodi and part of the OS, but haven't had chance to explore in detail yet. It would be great to make use of these final few keys.

Hi julianmclean

I like your idea about using Longpress on the play pause button for stop. This will free up the Magnify button for me to use as Global Search. Unfortunately i cannot seem to get Longpress to work on Windows.

I too have the same issues with the keys you detailed above. In Windows they are not recognised. Except the 4 Rectangles (above Explorer button) I can manipulate this button in AHK to be used in Kodi.

Update on Longpress, i can get it to work on other buttons just not Play Pause. Will keep on investigating.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18