Some entries for Remote VRC-1100 not working, why?

Hi,

I have created a file named keyboard.xml in my .kdi/userdata/keymaps folder, but I have the problem that some of the keys do not work. First of all: I always thought that the keymap.xml always has priority over the mappings of the system. So if I add a global keymapping, this should always be used instead of anything that comes with the system, right?

First of all, here is my complete keyboard.xml in userdata:

<keymap>
  <global>
    <keyboard>
      <f15>VolumeUp</f15>
      <f14>VolumeDown</f14>
      <return mod="alt">XBMC.ActivateWindow(Home)</return>  <!--Start key -->
      <f13>Mute</f13>   
      <f4 mod="alt">ActivateWindow(ShutdownMenu)</f4>  <!--close key -->
      <numpadtimes>Info</numpadtimes>  <!--star key -->
      <numpadfive mod="alt">ContextMenu</numpadfive>  <!--hash key -->
      <r mod="ctrl">AudioNextLanguage</r>   <!--record key -->     
      <o mod="ctrl">Info</o>     <!-- Button under Yellow -->
      <g mod="ctrl">ActivateWindow(Home)</g>       <!-- Button under Blue -->
      <t mod="ctrl">AudioDelayMinus</t>      <!-- Button under Green -->
      <m mod="ctrl,shift">AudioDelayPlus</m>  <!-- Button under Red -->
      <power>XBMC.ActivateWindow(ShutDownMenu)</power>
    </keyboard>
  </global>  
</keymap>

Most of the line work, but the following don’t:

  <t mod="ctrl">AudioDelayMinus</t>      <!-- Button under Green -->

What happens is that when I run a video, XBMC tries to position subtitles instead of setting Audio Delay Minus. AudiDelayplus (button under red) works however.

  <power>XBMC.ActivateWindow(ShutDownMenu)</power>
  <f4 mod="alt">ActivateWindow(ShutdownMenu)</f4>  <!--close key -->

This never works, neither on the power-button, nor on the Close Button. Is my syntax correct? I want to get the Shutdown-Menu displayed from everywhere. How can I achieve that?

<g mod="ctrl">ActivateWindow(Home)</g>       <!-- Button under Blue -->

This doesn’t work either, even when I’m on the start page.

I ´have the impression that Kodi prefers other settings from the preinstalled keymappings, where can I find these, and why are mine not used?

The Hama remote sends multiple key combinations for ech button press. Put kodi in debug mode then tail kodi.log to see them, my guess is some other key combo then the one you’re using is calling a different action.

tail -f /home/osmc/.kodi/temp/kodi.log

Okay, I have pressed once following buttons:

button under yellow
button under blue
button under green
button under red
Record Button
Start Button
Astersik (*) Button
Hash Button (#)
Close Button.

And here is what my log says:

19:35:49 T:3025018880   DEBUG: Keyboard: scancode: 0x0e, sym: 0x0008, unicode: 0x0008, modifier: 0x0
19:35:49 T:3025018880   DEBUG: OnKey: backspace (0xf008) pressed, action is Back
19:35:49 T:3025018880   DEBUG: CGUIWindowManager::PreviousWindow: Deactivate
19:35:49 T:3025018880   DEBUG: ------ Window Deinit (Settings.xml) ------
19:35:49 T:3025018880   DEBUG: CGUIWindowManager::PreviousWindow: Activate new
19:35:49 T:3025018880   DEBUG: ------ Window Init (Home.xml) ------
19:36:06 T:3025018880   DEBUG: Keyboard: scancode: 0x1d, sym: 0x0132, unicode: 0x0000, modifier: 0x40
19:36:06 T:3025018880   DEBUG: OnKey: ctrl-leftctrl (0x1f0d0) pressed, action is
19:36:06 T:3025018880   DEBUG: Keyboard: scancode: 0x18, sym: 0x006f, unicode: 0x006f, modifier: 0x40
19:36:06 T:3025018880   DEBUG: OnKey: ctrl-o (0x1f04f) pressed, action is ActivateWindow(TVRecordings)
19:36:06 T:3025018880   DEBUG: Activating window ID: 10616
19:36:06 T:3025018880   DEBUG: ------ Window Deinit (Home.xml) ------
19:36:06 T:3025018880   DEBUG: ------ Window Init (MyPVRRecordings.xml) ------
19:36:06 T:3025018880   DEBUG: CGUIWindowManager::PreviousWindow: Deactivate
19:36:06 T:3025018880   DEBUG: CGUIWindowManager::PreviousWindow: Activate new
19:36:06 T:3025018880   DEBUG: ------ Window Init (Home.xml) ------
19:36:06 T:3025018880   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
19:36:07 T:3025018880   DEBUG: Keyboard: scancode: 0x1d, sym: 0x0132, unicode: 0x0000, modifier: 0x40
19:36:07 T:3025018880   DEBUG: OnKey: ctrl-leftctrl (0x1f0d0) pressed, action is
19:36:07 T:3025018880   DEBUG: Keyboard: scancode: 0x22, sym: 0x0067, unicode: 0x0067, modifier: 0x40
19:36:07 T:3025018880   DEBUG: OnKey: ctrl-g (0x1f047) pressed, action is ActivateWindow(TVGuide)
19:36:07 T:3025018880   DEBUG: Activating window ID: 10617
19:36:07 T:3025018880   DEBUG: ------ Window Deinit (Home.xml) ------
19:36:07 T:3025018880   DEBUG: ------ Window Init (MyPVRGuide.xml) ------
19:36:07 T:3025018880   DEBUG: CGUIWindowManager::PreviousWindow: Deactivate
19:36:07 T:3025018880   DEBUG: CGUIWindowManager::PreviousWindow: Activate new
19:36:07 T:3025018880   DEBUG: ------ Window Init (Home.xml) ------
19:36:09 T:2894730272   DEBUG: script.module.osmcsetting.updates :  - blurp 662 - Home.xml
19:36:09 T:3025018880   DEBUG: Keyboard: scancode: 0x1d, sym: 0x0132, unicode: 0x0000, modifier: 0x40
19:36:09 T:3025018880   DEBUG: OnKey: ctrl-leftctrl (0x1f0d0) pressed, action is
19:36:09 T:3025018880   DEBUG: Keyboard: scancode: 0x14, sym: 0x0074, unicode: 0x0074, modifier: 0x40
19:36:09 T:3025018880   DEBUG: OnKey: ctrl-t (0x1f054) pressed, action is ActivateWindow(TVChannels)
19:36:09 T:3025018880   DEBUG: Activating window ID: 10615
19:36:09 T:3025018880   DEBUG: ------ Window Deinit (Home.xml) ------
19:36:09 T:3025018880   DEBUG: ------ Window Init (MyPVRChannels.xml) ------
19:36:09 T:3025018880   DEBUG: CGUIWindowManager::PreviousWindow: Deactivate
19:36:09 T:3025018880   DEBUG: CGUIWindowManager::PreviousWindow: Activate new
19:36:09 T:3025018880   DEBUG: ------ Window Init (Home.xml) ------
19:36:11 T:3025018880   DEBUG: Keyboard: scancode: 0x1d, sym: 0x0132, unicode: 0x0000, modifier: 0x40
19:36:11 T:3025018880   DEBUG: OnKey: ctrl-leftctrl (0x1f0d0) pressed, action is
19:36:11 T:3025018880   DEBUG: Keyboard: scancode: 0x2a, sym: 0x0130, unicode: 0x0000, modifier: 0x41
19:36:11 T:3025018880   DEBUG: OnKey: ctrl-shift-leftshift (0x3f0d2) pressed, action is
19:36:11 T:3025018880   DEBUG: Keyboard: scancode: 0x32, sym: 0x004d, unicode: 0x004d, modifier: 0x41
19:36:11 T:3025018880   DEBUG: OnKey: ctrl-shift-m (0x3f04d) pressed, action is PlayerControl(ShowVideoMenu)
19:36:14 T:3025018880   DEBUG: Keyboard: scancode: 0x1d, sym: 0x0132, unicode: 0x0000, modifier: 0x40
19:36:14 T:3025018880   DEBUG: OnKey: ctrl-leftctrl (0x1f0d0) pressed, action is
19:36:14 T:3025018880   DEBUG: Keyboard: scancode: 0x13, sym: 0x0072, unicode: 0x0072, modifier: 0x40
19:36:14 T:3025018880   DEBUG: OnKey: ctrl-r (0x1f052) pressed, action is
19:36:14 T:3025018880   DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------
19:36:18 T:2814694432   DEBUG: Thread JobWorker 2814694432 terminating (autodelete)
19:36:20 T:3025018880   DEBUG: SECTION:UnloadDelayed(DLL: special://xbmcbin/system/ImageLib-arm.so)
19:36:20 T:3025018880   DEBUG: Unloading: /ImageLib-arm.so
19:36:21 T:3025018880   DEBUG: Keyboard: scancode: 0x7d, sym: 0x0136, unicode: 0x0000, modifier: 0x400
19:36:21 T:3025018880   DEBUG: GetActionCode: Trying Hardy keycode for 0x20f200
19:36:21 T:3025018880   DEBUG: Previous line repeats 3 times.
19:36:21 T:3025018880   DEBUG: OnKey: meta-0 (0x20f200) pressed, action is
19:36:21 T:3025018880   DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x500
19:36:21 T:3025018880   DEBUG: OnKey: alt-meta-leftalt (0x24f0d4) pressed, action is
19:36:21 T:3025018880   DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x0000, modifier: 0x500
19:36:21 T:3025018880   DEBUG: OnKey: alt-meta-return (0x24f00d) pressed, action is
19:36:23 T:3025018880   DEBUG: Keyboard: scancode: 0x37, sym: 0x010c, unicode: 0x0000, modifier: 0x0
19:36:23 T:3025018880   DEBUG: OnKey: numpadtimes (0xf062) pressed, action is
19:36:24 T:3025018880   DEBUG: Keyboard: scancode: 0x45, sym: 0x012c, unicode: 0x0000, modifier: 0x1000
19:36:24 T:3025018880   DEBUG: OnKey: numlock (0xf0da) pressed, action is
19:36:24 T:3025018880   DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x1100
19:36:24 T:3025018880   DEBUG: OnKey: alt-leftalt (0x4f0d4) pressed, action is
19:36:24 T:3025018880   DEBUG: Keyboard: scancode: 0x51, sym: 0x0103, unicode: 0x0000, modifier: 0x1100
19:36:24 T:3025018880   DEBUG: OnKey: alt-numpadthree (0x4f073) pressed, action is
19:36:24 T:3025018880   DEBUG: Keyboard: scancode: 0x4c, sym: 0x0105, unicode: 0x0000, modifier: 0x1100
19:36:24 T:3025018880   DEBUG: OnKey: alt-numpadfive (0x4f075) pressed, action is
19:36:24 T:3025018880   DEBUG: Keyboard: scancode: 0x45, sym: 0x012c, unicode: 0x0000, modifier: 0x0
19:36:24 T:3025018880   DEBUG: OnKey: numlock (0xf0da) pressed, action is
19:36:26 T:3025018880   DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x100
19:36:26 T:3025018880   DEBUG: OnKey: alt-leftalt (0x4f0d4) pressed, action is
19:36:26 T:3025018880   DEBUG: Keyboard: scancode: 0x3e, sym: 0x011d, unicode: 0x0000, modifier: 0x100
19:36:26 T:3025018880   DEBUG: OnKey: alt-f4 (0x4f093) pressed, action is
19:36:29 T:3025018880   DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x0000, modifier: 0x0
19:36:29 T:3025018880   DEBUG: OnKey: return (0xf00d) pressed, action is Select

So, what may be wrong? I think my settings are right, or what can you read from these results?

Thanks :slight_smile:

I have this remote. It sucks.

It’s designed to emulate a Windows MCE remote. It works OK on Windows, but not great. Linux is a different story. Just pressing the right click button is annoying as it moves one up (multiple keys sent) and then does it.

There was a ‘hama-client’ written for Linux that properly filtered and handled buttons correctly. It worked fine on x64 but for some reason on ARM it never behaved as expected, so I left it out of Raspbmc.

You could have a look at GitHub - xhaggi/kodi-eventclient-hama-mce: Kodi event client for Hama MCE Remote Control. If you want to try, you’ll probably need to sudo apt-get update && sudo apt-get install build-essential git-core libudev-dev libusb-dev

IIRC running from command line worked fine, but we could never get udev to initialise it properly. I wonder if that’s because we tried to launch a daemon from udev when timeout is 10 secs… cc @DBMandrake (but I digress)

Sam

Hi Sam,

okay, maybe the remote isn’t great, but it seems to work well, because the predefined buttons work flawlessly, and I also use this remote under Win 7 x64 with Kodi, and no problems, and have a similar setting.

But let us have a closer look at what is happening, for example this one:

OnKey: ctrl-o (0x1f04f) pressed, action is ActivateWindow(TVRecordings)

This probably corresponds to:

   <o mod="ctrl">Info</o>     <!-- Button under Yellow -->

But it performs another action.

So my initial guess that the userdefined keyboard.xml does not in all cases win against the predefined commands, or where is that Action ActivateWindow(TVRecordings) come from?

Where EXACTLT is your userdta keymap.xml ?

I use TotalCommander to access the file using FTP at this location:

0:/home/osmc/.kodi/userdata/keymaps/keyboard.xml

No other files are in this directory

And I use Putty to make sure to chmod the permissions to 777 so that every user can access it.

OK, that’s the right location, what did you use to write the file? Open it in Notepad ++ and convert it to unix line endings then resave it to the above location

I did that, and obviously it works for some buttons, I also tried to build in a notification like for example this:

<g mod="ctrl">Notification(Key, u/Blue, 3)</g>       <!-- Button under Blue -->

The notification does NOT work for the ctrl-g (button under blue), as you see in the log, it activates something else, but for example for the button under red…

I see the notification dialog, but there seem to be some buttons that are elsewhere defined, which I cannot override :frowning:
Really strange behaviour

Edit: can somebody tell me quickly where I find the default keymaps that come with the system?

Is it possible that there is a bug preventing the contents of userdata to be used preferredly?

Does anybody have another idea? I am totally clueless :frowning: