Mapping remote keys - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52) +---- Thread: Mapping remote keys (/showthread.php?tid=186506) Pages:
1
2
|
Mapping remote keys - Eklar - 2014-02-16 I'm trying to map a few buttons on my Harmony One remote which can't be mapped with Logitech's software directly. What I'd like to do is, for example, re-map the Guide button to ContextMenu Using lirc's irw command, I get the following entry when pressing Guide: Code: 000000037ff07bdb 00 DVD mceusb Which means that lirc interprets the button press as "DVD" button. Then I go to lircd.conf, search for the last three letters in the long string above (000000037ff07bdbbdb), and find the following line: Code: DVD 0x00007bdb Which corresponds to the DVD button. To edit XBMC's remote.xml, I add the following, which in my view should re-map the Guide button press interpreted as DVD by lirc to XBMC's ContextMenu: Code: <DVD>ContextMenu</DVD> But it doesn't work. After looking into it further, I noticed that the Guide button is actually interpreted as "menu" button in XBMC. In other words, if I change the appropriate entry to: Code: <menu>ContextMenu</menu> Then the Guide button pops up a context menu. Now, that fixes that particular button, but there are other buttons which don't do anything, but which I'd like to map to do something, such as turn subtitles on/off or go to the next subtitle. What am I doing wrong? RE: Mapping remote keys - negge - 2014-02-17 You need to map LIRC button names to XBMC's internal button names using Lircmap.xml. RE: Mapping remote keys - FishOil - 2014-02-17 While I am sure negge thought he was helping, an explanation is required. XBMC and Lirc need some understanding before attempting to tweak it. There are 3 things that need to be understood. Actual buttons on the remote /etc/lirc/lircd.conf XBMC names for the lirc buttons /home/xbmc-user-name/.xbmc/userdata/lircmap.xml XBMC commands that are tied to the XBMC names /home/xbmc-user-name/.xbmc/userdata/keymaps/remote.xml Here is an example and traced backwards. XBMC sends the ContextMenu command <menu>ContextMenu</menu> in /home/xbmc-user-name/.xbmc/userdata/keymaps/remote.xml That ContextMenu command is tied to the menu name <menu>DVD_Menu</menu> in /home/xbmc-user-name/.xbmc/userdata/lircmap.xml The menu name is tied to the actual button DVD_Menu (thats what its called for MY lirc remote yours will be different) in /etc/lirc/lircd.conf remote.xml Code: <keymap> lircmap.xml Code: <lircmap> lircd.conf Code: begin remote I have only displayed the parts of those files that are of interest. So dont try to copy paste that into your files. Remember......lircd.conf is the file that actually contains an actual button on your remote. DO NOT make the mistake of thinking the other two files describe button names on your remote. The menu in remote.xml and lircmap.xml have nothing to do with the actual menu button on your remote. They are names and commands that POINT to the button on your remote. RE: Mapping remote keys - FishOil - 2014-02-17 To expand on your final question. You cannot make up XBMC names (as you did above <DVD>ContextMenu</DVD>). You must find one you dont intend to use and repurpose it for the new intended function. Remember...those names have nothing to do with the buttons on your remote. For example The name power in remote.xml can be used to turn the subtitles on and off and tied to ANY button on your remote You can find XBMC names here https://github.com/xbmc/xbmc/blob/master/xbmc/input/ButtonTranslator.cpp#L1269 RE: Mapping remote keys - Eklar - 2014-02-17 Thanks for the help. I think I now get the concept, but still can't get the changes to work. For testing purposes, I'm trying to ge the Guide button on my remote to map to pausing playback. This is what irw shows for Guide button press: Code: 000000037ff07bdb 00 DVD mceusb Here is my lircd.conf for bdb Code: DVD 0x00007bdb Lircmap.xml for DVD Code: <lircmap> and complete remote.xml Code: <keymap> Doesn't pause, though. RE: Mapping remote keys - FishOil - 2014-02-18 (2014-02-17, 22:45)Eklar Wrote: Here is my lircd.conf for bdb Thats not the correct format for lircd.conf If your entire file follows that format its completely incorrect. In addition, I forgot to mention that Lircmap.xml has a capital letter L in the name RE: Mapping remote keys - Eklar - 2014-02-18 (2014-02-18, 00:57)FishOil Wrote:(2014-02-17, 22:45)Eklar Wrote: Here is my lircd.conf for bdb My bad, pasted the wrong file. Here's what DVD says in lircd.conf . Previous post updated. Code: DVD 0x00007bdb My Lircmap.xml starts with a capital L. RE: Mapping remote keys - FishOil - 2014-02-18 (2014-02-18, 02:37)Eklar Wrote:(2014-02-18, 00:57)FishOil Wrote:(2014-02-17, 22:45)Eklar Wrote: Here is my lircd.conf for bdb Post the full content of lircd.conf. RE: Mapping remote keys - negge - 2014-02-18 Make sure you've placed Lircmap.xml directly in your userdata folder, not in keymaps/. RE: Mapping remote keys - Eklar - 2014-02-19 (2014-02-18, 08:35)negge Wrote: Make sure you've placed Lircmap.xml directly in your userdata folder, not in keymaps/. Double-checked, yes, it is under Code: /home/username/.xbmc/userdata Full lircd.conf below. Code: begin remote RE: Mapping remote keys - FishOil - 2014-02-19 I can look more in detail later but off hand I think it needs a capital P in Pause in remote.xml <menu>Pause</menu> RE: Mapping remote keys - Eklar - 2014-02-19 (2014-02-19, 01:54)FishOil Wrote: I can look more in detail later but off hand I think it needs a capital P in Pause I actually have tried both capitalized and non-capitalized, neither work. I bet the issue is something simple/stupid like that, though So many layers of files and so many small things that can go wrong in the chain. RE: Mapping remote keys - FishOil - 2014-02-19 Lircmap <pause>DVD</pause> Remote.xml <pause>Pause</pause> It wont work if the function or name is duplicated in the relevant section. It must be unique Edit Just to clarify. You can make every button pause. as in Lircmap.xml (if these were th actual name of your buttons) <pause>DVD</pause> <pause>Guide</pause> <pause>Play</pause> <pause>Stop</pause> <pause>Rewind</pause> But you cant Remote.xml <keymap> <global> <remote> <play>Pause</play> <pause>Pause</pause> <menu>Pause</menu> Edit again, I actually just tried the above and it still works So if your Remote.xml is setup correctly the only file you need to modify is Lircmap.xml when you want to change a button function 3rd Edit What does NOT work is Lircmap.xml <pause>DVD</pause> <stop>DVD</stop> <play>DVD</play> The actual button NAME must be unique in Lircmap.xml RE: Mapping remote keys - FishOil - 2014-02-19 Ok, So here is the bottom line. There are two acceptable ways of doing this. In Lircmap.xml you can change <pause>WHATEVER IS THERE NOW</pause> to <pause>DVD</pause> But "DVD" can only occur one time in that file under the mceusb section. Swap it with whatever your changing or remove just the three letters (DVD) between the brackets. If its <menu>DVD</menu> then make it <menu></menu> Or In Remote.xml add whatever xbmc name was given to your DVD (Lircmap.xml XBMC Name) button to the fullscreenvideo or global section. From your previous post is would seem that its menu. As in <menu>DVD</menu> So, in Remote.xml <FullscreenVideo> <remote> <menu>Pause</menu> Personally I prefer only changing Lircmap.xml if your remote.xml is configured correctly. That way I dont have to hunt down the different instances. If you still cant get it going, Post all three files to pastebin and I can help you set it up. RE: Mapping remote keys - negge - 2014-02-19 (2014-02-19, 07:00)FishOil Wrote: Personally I prefer only changing Lircmap.xml if your remote.xml is configured correctly. I agree, I try to modify the actual keymap as little as possible. |