MeleF10 Pro Button mapping[for Windows/DOWNLOAD][need help under Linux/Rapbmc]
#1
Hello there,
as nobody got the MeleF10 Pro to fully work under Linux/Raspbmc and Windows, I did it myself under Windows.
For those of you that don't know the Mele F10 Pro: its a cheap dual-sided remote with a QWERTY keyboard on one side and remote buttons on the other. it communicates wirelessly via an USB-Stick and shows up as a HID-Device.
Most of the buttons work Out-Of-the-Box, but some don't.
I found out that, besides from the Power Key, these buttons send events on HID-UsagePage 12 Usage 1, which is not captured by anything. (Im not really into HID, sorry if I say something wrong).

I managed to get Menu, Call, Hangup, "Smart Assistant" and AudioChange to work under Windows using AutoHotKey ( http://www.autohotkey.com/ ) and THIS Thread. I mapped them to Ctrl-Shift-Alt a,b,c,d,e so they can be mapped to XBMC. It works like a charm.

However, I (and many others) would appreciate if somebody could help in catching these HID-Events under Linux. I can provide Infos (UsagePage, Usage, VID, PID, Raw data on keypresses, etc.) on request, as I am not really into HID at all.

Greetings BlueFootball

UPDATE: get it here (read README.txt):
CLICK TO DOWNLOAD
Reply
#2
(2013-10-31, 11:22)BlueFootball Wrote: Hello there,
as nobody got the MeleF10 Pro to fully work under Linux/Raspbmc and Windows, I did it myself under Windows.
For those of you that don't know the Mele F10 Pro: its a cheap dual-sided remote with a QWERTY keyboard on one side and remote buttons on the other. it communicates wirelessly via an USB-Stick and shows up as a HID-Device.
Most of the buttons work Out-Of-the-Box, but some don't.
I found out that, besides from the Power Key, these buttons send events on HID-UsagePage 12 Usage 1, which is not captured by anything. (Im not really into HID, sorry if I say something wrong).

I managed to get Menu, Call, Hangup, "Smart Assistant" and AudioChange to work under Windows using AutoHotKey (http://www.autohotkey.com/) and THIS Thread. I mapped them to Ctrl-Shift-Alt a,b,c,d,e so they can be mapped to XBMC. It works like a charm.

However, I (and many others) would appreciate if somebody could help in catching these HID-Events under Linux. I can provide Infos (UsagePage, Usage, VID, PID, Raw data on keypresses, etc.) on request, as I am not really into HID at all.

Greetings BlueFootball

UPDATE: get it here (read README.txt):
CLICK TO DOWNLOAD

Just a quick heads up - the link includes the right parenthesis ")" in the URL so it fails to open Smile
Might seem like the page is down for a newbie or someone in a hurry!
Reply
#3
Hi,

All links should work now Smile
Reply
#4
Thumbs Up 
Hi, created an account just to say THANK YOU VERY MUCH!!! Really works like a charm! I've created a GPO which changes the shell to:

Code:
C:\Windows\System32\wscript.exe "C:\Program Files (x86)\XBMC Shell\Invisible.vbs" "C:\Program Files (x86)\XBMC Shell\XBMCshell.cmd"

Invisible.vbs contains:

Code:
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False

This hides XBMCshell.cmd. This batch contains just 3 simple commands:

Code:
start /d "C:\Program Files (x86)\XBMC Shell" M10PRO_CHANGEKEYSV1.0.exe
"C:\Program Files (x86)\XBMC\XBMC.exe"
logoff

With this config my Mele F10 Pro works perfectly with XBMC! I've only changed the Smart Assistant key from power to info because Aeon Nox has it's own power menu item and info is a nice function to use.

Ref.:
http://www.experts-exchange.com/OS/Micro...Shell.html
http://www.avforums.com/threads/how-to-m...t-15473538

Thanks man, keep up the good work!
Reply
#5
Thank you sir! This helped a LOT!

I am now finally happy with the experience...

Anyhow, doing some research on the matter myself I found out that these are the scan codes linux catches from the remote. It installs 5 devices but only the first one receives codes:

MENU: 02 40 00 02 00 00 (gets recognized automatically)

SMART ASSISTANT: 02 4B 03 02 00 00

PICK-UP: 02 49 03 02 00 00

HANG-UP: 02 4A 03 02 00 00

SOUND SWITCH: 02 48 03 03 00 00

I hope this helps someone ;-)
Reply
#6
Hi there,

was wondering if any updates will be made for the xbmc xml file or if anyone has a working keymap for the Mele F10 Pro for xbmc?

Thanks
Reply
#7
I tried this out in Windows and it is perfect! Unfortunately my htpc is running ubuntu. I tried running the changekeys program using Wine, with no luck. The icon appears in the top bar, but the icon is blank. I'm completely new to Linux so I'm not even sure if it's possible to use the program you made. Any suggestions on how to get this working? I'm tempted to install Windows to get this.

Any suggestions on how to get this working?

Thanks!
Reply
#8
Thank you for the script and the extra buttons that work now but i have a strange issue.

With or without the script my Volume Buttons doesn't work at all... i tried to alter with the autohotkey to assign the volume + and - buttons but i was unsuccessful... the only way i can map the volume buttons is inside xbmc with the keymap plugin where it learns the keys but it assigns the same code for both volume + and -, i ended up to assign with the plugin the volume + with the correct button but the volume - with the home.

The strange part is that the volume buttons work if i run for example the windows media center.. only in xbmc they dont work..

Any help is appreciated.
There's no substitute for experience
Reply
#9
Thanks BlueFootball for posting the AutoHotKey script.

@bluechris,
You could append some of the keys from the keyboard on the back for the volume controls. I used the square brackets for volume up/down and it works better than if you use any keys from the front of the remote, because you don't have to repeatedly press the key to adjust the volume.

I had to put the lines below in the global and fullscreenvideo sections of the keyboard.xml file for the keys to work in both music and video.

<opensquarebracket>volumeup</opensquarebracket>
<closesquarebracket>volumedown</closesquarebracket>

If you want to change any other keys then here's a program you can use to edit the keyboard.xml file.
http://wiki.xbmc.org/index.php?title=KeyMapEdit
http://wiki.xbmc.org/index.php?title=HOW...yboard.xml

For anyone who has an OUYA console, this way doesn't work any better than the normal volume keys on the remote.
Reply
#10
I use "volampup" and "volampdown" to control the volume in xbmc on the ouya. I have them mapped to the prev//next buttons on the bottom row of the f10 pro. It only amps up the volume so i have my sound bar set at 15 which is just enough to hear but not to loud, then i use the f10 to adjust the volume on the fly between all the different streams i watch. I used keymap and programmed the prev/next to volum up and down then went in the the xml in xbmc userdata and changed volumeup and down to "volampup" and "volampdown". it works ok, better then using two remotes all the time. still need the other remote to turn on and off things but thats about it.
Reply
#11
Bluefootball great work.

Is there a reason why you did not include the 'Game', 'Mouse', 'remote', 'Left mouse' and 'Right Mouse' buttons. I don't need the mouse buttons in my set up, so I would wish to map them to other functions...

Hope you can help me.
Thieske
Reply
#12
I have been using your script for the MeleF10 Pro for a while now and it works great, only question I have had is how do I recompile it if I want to change the digital assistant to be the windows key. Makes it way easier to launch XBMC from the tile interface in windows
Reply
#13
Can't get it installed on my windows 8.1. I get this msg This app can't run on your PC To find a version for your PC, check with the software publisher. This happen when i click on M10PRO_CHANGEKEYSV1.0.exe.
Reply
#14
@BlueFootball

If I run the compiled script on my Windows 7 HTPC and then use the XBMC-MCE ShowKye.exe to check what is being received from the Mele F10 Pro. This works fine, the changed button presses are seen.

I updated the original script to change the button actions as follows but nothing is received. I have then used the original uncompiled script and get the same issues. Can you shed any light on why the compiled script works and the uncompiled dosn't?

Through all of this the airmouse and keyboards continue to work.


}

Return

147456:
SendInput ^g ; MENU
Return

149507:
SendInput ^m ; Change Audio Source
Return

149763:
SendInput ^s ; CALL UP
Return

150019:
SendInput ^p ; CALL DOWN
Return

150275:
SendInput #!{Enter} ; Smart Assistant
Return

Script lines most recently executed (oldest first). Press [F5] to refresh. The seconds elapsed between a line and the one after it is in parentheses to the right (if not 0). The bottommost line's elapsed time is the number of seconds since it executed.

124: AHKHID_Included := True
129: DI_DEVTYPE := 4
131: DI_MSE_ID := 8
132: DI_MSE_NUMBEROFBUTTONS := 12
133: DI_MSE_SAMPLERATE := 16
135: DI_MSE_HASHORIZONTALWHEEL := 20
138: DI_KBD_TYPE := 8
139: DI_KBD_SUBTYPE := 12
140: DI_KBD_KEYBOARDMODE := 16
141: DI_KBD_NUMBEROFFUNCTIONKEYS := 20
142: DI_KBD_NUMBEROFINDICATORS := 24
143: DI_KBD_NUMBEROFKEYSTOTAL := 28
145: DI_HID_VENDORID := 8
146: DI_HID_PRODUCTID := 12
147: DI_HID_VERSIONNUMBER := 16
148: DI_HID_USAGEPAGE := 20 | 0x0100
149: DI_HID_USAGE := 22 | 0x0100
153: II_DEVTYPE := 0
154: II_DEVHANDLE := 8
156: II_MSE_FLAGS := (08+A_PtrSize*2) | 0x0100
158: II_MSE_BUTTONFLAGS := (12+A_PtrSize*2) | 0x0100
160: II_MSE_BUTTONDATA := (14+A_PtrSize*2) | 0x1100
162: II_MSE_RAWBUTTONS := (16+A_PtrSize*2)
163: II_MSE_LASTX := (20+A_PtrSize*2) | 0x1000
165: II_MSE_LASTY := (24+A_PtrSize*2) | 0x1000
167: II_MSE_EXTRAINFO := (28+A_PtrSize*2)
169: II_KBD_MAKECODE := (08+A_PtrSize*2) | 0x0100
171: II_KBD_FLAGS := (10+A_PtrSize*2) | 0x0100
173: II_KBD_VKEY := (14+A_PtrSize*2) | 0x0100
174: II_KBD_MSG := (16+A_PtrSize*2)
176: II_KBD_EXTRAINFO := (20+A_PtrSize*2)
178: II_HID_SIZE := (08+A_PtrSize*2)
179: II_HID_COUNT := (12+A_PtrSize*2)
182: II_HID_DATA := (16+A_PtrSize*2)
186: RIM_TYPEMOUSE := 0
187: RIM_TYPEKEYBOARD := 1
188: RIM_TYPEHID := 2
192: RIDEV_REMOVE := 0x00000001
194: RIDEV_EXCLUDE := 0x00000010
197: RIDEV_PAGEONLY := 0x00000020
200: RIDEV_NOLEGACY := 0x00000030
202: RIDEV_INPUTSINK := 0x00000100
204: RIDEV_CAPTUREMOUSE := 0x00000200
205: RIDEV_NOHOTKEYS := 0x00000200
209: RIDEV_APPKEYS := 0x00000400
212: RIDEV_EXINPUTSINK := 0x00001000
216: RIDEV_DEVNOTIFY := 0x00002000
221: RIM_INPUT := 0
223: RIM_INPUTSINK := 1
228: RID_INPUT := 0x10000003
229: RID_HEADER := 0x10000005
235: MOUSE_MOVE_RELATIVE := 0
236: MOUSE_MOVE_ABSOLUTE := 1
237: MOUSE_VIRTUAL_DESKTOP := 0x02
238: MOUSE_ATTRIBUTES_CHANGED := 0x04
241: RI_MOUSE_LEFT_BUTTON_DOWN := 0x0001
242: RI_MOUSE_LEFT_BUTTON_UP := 0x0002
243: RI_MOUSE_RIGHT_BUTTON_DOWN := 0x0004
244: RI_MOUSE_RIGHT_BUTTON_UP := 0x0008
245: RI_MOUSE_MIDDLE_BUTTON_DOWN := 0x0010
246: RI_MOUSE_MIDDLE_BUTTON_UP := 0x0020
247: RI_MOUSE_BUTTON_4_DOWN := 0x0040
248: RI_MOUSE_BUTTON_4_UP := 0x0080
249: RI_MOUSE_BUTTON_5_DOWN := 0x0100
250: RI_MOUSE_BUTTON_5_UP := 0x0200
251: RI_MOUSE_WHEEL := 0x0400
257: KEYBOARD_OVERRUN_MAKE_CODE := 0xFF
260: RI_KEY_MAKE := 0
261: RI_KEY_BREAK := 1
262: RI_KEY_E0 := 2
263: RI_KEY_E1 := 4
264: RI_KEY_TERMSRV_SET_LED := 8
265: RI_KEY_TERMSRV_SHADOW := 0x10
269: if Not AHKHID_Included
272: {
278: {
305: {
317: {
321: {
328: {
333: {
356: {
393: {
429: {
470: {
496: {
534: {
570: {
578: {
022: Gui,+LastFound
024: hGui := WinExist()
030: WM_INPUT := 0xFF
032: OnMessage(WM_INPUT, "InputMsg")
038: r := AHKHID_Register(12, 1, hGui, RIDEV_INPUTSINK)
432: if Not (UsagePage || Usage || Handle || Flags)
447: VarSetCapacity(uDev, (8 + A_PtrSize), 0)
450: Handle := ((Flags & 0x00000001) || (Flags & 0x00000010)) ? 0 : Handle
452: NumPut(UsagePage, uDev, 0, "UShort")
453: NumPut(Usage, uDev, 2, "UShort")
454: NumPut(Flags, uDev, 4, "UInt")
455: NumPut(Handle, uDev, 8, "Ptr")
458: r := DllCall("RegisterRawInputDevices", "Ptr", &uDev, "UInt", 1, "UInt", 8 + A_PtrSize)
461: if Not r || ErrorLevel
462: ErrorLevel = RegisterRawInputDevices call failed.
Return value: %r%
ErrorLevel: %ErrorLevel%
Line: %A_LineNumber%
Last Error: %A_LastError%
463: Return,-1
040: {
099: Return (38.09)

Press [F5] to refresh.
Reply
#15
Wink 
For those searching like i did today for a solution for Ubuntu/Linux i managed to figure out how to map my Menu button and Power to interact with XBMC/KODI.

I used sudo xev to monitor keypress to get the keycode for each button. I got 72 for the "Game" button, 147 for the "Menu button"

then i used this answer to remap those keys to "c" for the menu button and "i" for the game button. ( http://askubuntu.com/questions/24916/how...or-devices )

the last instruction mentions to create the .Xinitrc file but that did not load on its own on reboot, so i simply added the command "xmodmap .Xmodmap" in my startup applications (run at startup commands). This ensure your keymaps are loaded on boot everytime.

The PowerOff button caused issues in my household as the less techy users kept pushing it to turn the tv on (which works of the IR side not RF) and thus turning the ubuntu box completely off.

I chose to simply disable it and followed this tutorial to do so: http://askubuntu.com/questions/66723/how...wer-button

I take no credit for any of the answers provided here and those belong to their original experts that answered those questions. I simply compiled those answers here so that someone else may not have to search as long as i did. If anyone has a more streamlined way of doing this i am open to ideas.

This should work on RASPBMC in a similar manner however not quite sure how the xmodmap part would work as rasbmc does not start its on xserver display...
Reply

Logout Mark Read Team Forum Stats Members Help
MeleF10 Pro Button mapping[for Windows/DOWNLOAD][need help under Linux/Rapbmc]2