Simple keyboard.xml question, I hope
#1
I'm running Live (not Eden) and I'm using a Harmony remote. could someone show me an XML snippet of what section and specific markup I need to program an MCE remote button ("Music") to always just go to "Albums" view in music. Something like this:
Code:
<keymap>
  <global>
    <keyboard>
    </keyboard>
  </global>
  <home>
    <remote>
      <music>ActivateWindow(Music,Albums)</music>
    </remote>
  </home>
</keymap>
Reply
#2
I have 2 xml files in /home/user/.xbmc/userdata/keymaps/
Both are based on the defaults, keyboard.xml and remote.xml.

In remote.xml I would think you would need (leaving the default file basically unchanged except for the "mymusic" tag)
Code:
<keymap>
  <global>
    <remote>
    ...
    <mymusic>ActivateWindow(Music,Albums)</mymusic>
    ...
  </global>
  ...

When you say "not Eden", do you mean your XBMC is based on dharma? If so, you may then need

Code:
<mymusic>ActivateWindow(MusicLibrary,Albums)</mymusic>
Reply
#3
Thanks, farmerdave. I downloaded the remote.xml file and made some adjustments and ssh'd it to /home/user/.xbmc/userdata/keymaps/, restarted XBMC and it doesn't appear to be doing anything. I even tossed in Notification("Hello", 4) in a button and that doesn't do anything either... I'm expecting to see a "Hello" message on the screen for a few seconds.

I'll keep playing here to see if I can get it going.
Reply
#4
I have a keyboard.xml file too. I mapped z to what I hoped would take me into Albums view. all it does is take me to MyMusic. I put it in like this
Code:
<z>ActivateWindow(Music, Albums)</z>

For a test, I mapped the v key to show a notification, like this:
Code:
<v>Notification(title here, you did stuff, 4)</v>

The notification works fine for keyboard. Still no notification from the remote. I'll have to map a different button... maybe zero or something.
Reply
#5
I think that there are limited key ids for remote controls, and letters of the alphabet are not included because your remote can't send that signal (unless you customise it with Logitech software maybe?). I've got a Harmony 525 and have been re-configuring it over the past few nights also, so will have a look at that.

Also, I think we overlooked the syntax. The code should read

<mymusic>XBMC.ActivateWindow(Music,Albums)</mymusic>

or

<mymusic>XBMC.ActivateWindow(MusicLibrary,Albums)</mymusic>
Reply
#6
There are a few ways to configure the Harmony remote. I have two activities set up with different MCE types. One is MCE remote or MCE computer or something like that, and one is MCE Keyboard. They both seem to work. I believe the MCE Keyboard one emulates keypress events of the keyboard. Last night I mapped a notification to the "0" key on the remote (in MCE remote configuration) and it still did nothing, so I think that whatever the Harmony is sending is not in the remote.xml file. I also mappped a Notification to the "v" key on a keyboard and that one works, using a keyboard. So, I think I'll mess with the keyboard.xml file and see if I can get the MCE Keyboard settings on the Harmony to do what I need. However, I'm still not sure if it will work. I had "ActivateWindow(MusicLibrary,Albums)" mapped to the keyboard 'z' key and it still just takes me to the MyMusic screen to choose Genre, Albums, etc. I'll check syntax and ensure it is prefixed with XBMC.
Reply
#7
Have you checked what your remote is sending by using irw in a terminal?
Reply
#8
I have not checked what the remote is sending using irw... don't know what that is Big Grin
I did turn on debugging, and I found that the "Music" button on the remote logs this:
DEBUG: OnKey: 9 pressed, action is XBMC.ActivateWindow(MyMusic)

Also found that in my keyboard.xml file if I map 'z' to XBMC.ActivateWindow(MusicLibrary, Albums) it appears to take me to Album view every time. Now if I can just figure out what OnKey: 9 is and where to override the damn thing.
Reply
#9
At the command line, try
Code:
$ irw
Then press some buttons on your remote and they should output to stdout. To finish the programme just press "Ctrl + c".
Reply

Logout Mark Read Team Forum Stats Members Help
Simple keyboard.xml question, I hope0