Solved Add missing scancodes to XBMC ? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222) +--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9) +--- Thread: Solved Add missing scancodes to XBMC ? (/showthread.php?tid=170866) Pages:
1
2
|
Add missing scancodes to XBMC ? - dhead - 2013-08-08 Few of the scancodes of the media keys on my rf remote aren't included in XBMC (FastForward, Rewind, Play and Record). I wouldn't bother to ask adding misc scancodes to XBMC but it looks like these are known scancodes and in both Windows and Gnome-Linux these keys recognized and working pretty well (except Record). On all platforms Record isn't recognize in XBMC. On OpenELEC Xorg (Generic) FF, RR and Record doesn't work. On OpenELEC Raspberry Pi (Generic) FF, RR, Play and Record doesn't work. As FF, RR and Play does work on Windows and Gnome-Linux I'm guessing there's a standard to these scancodes and that the system key mapping preceed XBMC so XBMC doesn't get the original scancode but another that it does recognize. I must admit that I've failed to find where these are re-mapped on Gnome-Linux (maybe lirc ?). If there is such standard I didn't found any resource on it but I did found similar users' posts with the same scancodes (and more scancodes of different buttons) so it may worth to add these to XBMC. https://github.com/OpenELEC/OpenELEC.tv/issues/1312 http://ubuntuforums.org/showthread.php?t=1890156 OpenELEC Xorg (Generic) v3.1.5 Code: RR OpenELEC Raspberry Pi, Rbej Gotham build Code: RR Linux-Gnome, XBMC 12.2 Code: RR Windows, Gotham alpha6 Code: RR RE: Add missing scancodes to XBMC ? - FernetMenta - 2013-08-08 AFAIK you can't detect those media keys with scancodes only. OE is lacking an input method. As a result XOpenIM fails and it creates no input context which is required for detecting those keys. I think if OE adds required modules to Linux, it should work. RE: Add missing scancodes to XBMC ? - dhead - 2013-08-09 Thanks FernetMenta, I guess I'll bug OpenELEC dev's. What about the Record button ? It isn't recognize by XBMC on Windows (although the APPCOMMAND 48 isn't special). On Gnome-Linux the button isn't recognize by XBMC but looks like it does mapped to the proper keycode by the system, here's the output of xev: Code: KeyPress event, serial 33, synthetic NO, window 0x2200001, RE: Add missing scancodes to XBMC ? - FernetMenta - 2013-08-09 OE and XBMC mainline differ in this case. OE already uses new interface to X11, mainline still the old SDL lib. I have mapped audio record: https://github.com/FernetMenta/xbmc/blob/master/xbmc/windowing/WinEventsX11.cpp#L152 could you try this version: http://forum.xbmc.org/showthread.php?tid=116996 or compile my master branch. If those keys do not work, I can fix it. RE: Add missing scancodes to XBMC ? - dhead - 2013-08-09 FernetMenta, I've compiled from your master branch on Arch Linux x86_64, Gnome 3.8 and it looks like RR, FF and Record aren't recognized in XBMC (so it the same as OpenELEC Xorg (Generic) ). Code: RR Edit: This XBMC build also doesn't differentiate between regular number keys to numpad number keys. Code: Zero Edit 2: 1. So this is a general issue with the move from SDL to X11 ? 2. These scancodes aren't known to X11 (not set in XF86keysym.h) so this means one need to create xmodmap to be able to use such media keys ? 3. Why the numpad number keys are recognized as regular number keys in XBMC ? 4. What about the Rasbperry Pi that don't use X11 ? RE: Add missing scancodes to XBMC ? - FernetMenta - 2013-08-09 can you try this? https://github.com/FernetMenta/xbmc/commit/c75347ca19af7ad7c701e77d258ded1aadcd0a7e at least it fixes mumbad keys. 1.) nope, 2.) i would be interest if the fix changes anything to those keysymx not known 4.) on Linux there are various ways to determine key presses. AFAIK rpi uses evdev. the advantage of X11 is that it allows that a user remaps keys. EDIT: this should fix it for OE (X11): https://github.com/FernetMenta/xbmc/commit/c643928909249f536c65d96683576b2df907fcf6 RE: Add missing scancodes to XBMC ? - dhead - 2013-08-09 Thanks FernetMenta, I've tried the first commit and it does fix the numpads but the FF, RR and Record still aren't recognized. I'll recompile XBMC with the second commit and try again. RE: Add missing scancodes to XBMC ? - FernetMenta - 2013-08-09 I don't have a multi media keyboard and can't try myself. you could try inserting this: XLookupString(&xevent.xkey, NULL, 0, &xkeysym, NULL); instead of the deleted line in https://github.com/FernetMenta/xbmc/commit/c75347ca19af7ad7c701e77d258ded1aadcd0a7e for some reason translation of scancode to keysym does not work for those. RE: Add missing scancodes to XBMC ? - FernetMenta - 2013-08-09 I changed this commit to: https://github.com/FernetMenta/xbmc/commit/fb5648cdf46ff80ae4eee93073dff005fe87e9d4 looking at the code of xev they do the same thing. RE: Add missing scancodes to XBMC ? - dhead - 2013-08-09 I've compile XBMC with the last commit and I'm not sure what is going on. If I map the RR button (keycode 176 == 0xb0) with xmodmap to XF86AudioPlay it does recognized by XBMC. If I map the RR button to XF86AudioRewind it doesn't recognized by XBMC. Same goes to Record and FF. RE: Add missing scancodes to XBMC ? - FernetMenta - 2013-08-10 I can reproduce by mapping some key to XF86AudioRewind. will investigate. RE: Add missing scancodes to XBMC ? - FernetMenta - 2013-08-10 the problem is deeper in XBMC, there is a special treatment for Windows but none for the other platforms. here is a fix: https://github.com/FernetMenta/xbmc/commit/df180bc99ab2c68661426d6a186dacba044aacc3 RE: Add missing scancodes to XBMC ? - dhead - 2013-08-10 Thanks FernetMenta, this is working great on Gnome 3.8 - Arch Linux x86_64. Probably need to bug a Windows' dev to add support for the Record button on Windows (that's "APPCOMMAND 48"). Maybe adding "APPCOMMAND_MEDIA_RECORD" in ButtonTranslator.cpp ? RE: Add missing scancodes to XBMC ? - FernetMenta - 2013-08-10 I would drop the entire appcommand handling in ButtonTranslator. This should be moved to windowing. The various platforms should send XMBCK_* events to application like I do in this new X11 implementation. RE: Add missing scancodes to XBMC ? - dhead - 2013-08-10 FernetMenta, Are you planning to add your changes to XBMC mainline as fixes or much later on as one PR that will move XBMC from SDL to use X11 ? (I hope I'm not mixing up). |