Kodi Community Forum

Full Version: Remote Right Click Problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using a Logitech Harmony remote & all is good except for the right click option.

When I press the button that I have associated with right click it won't do the command. The reason is because it will only right click where the mouse pointer is & as my remote doesn't use the mouse feature the mouse cursor just stays where it loads by default.

Is there away around this, the only buttons I could configure on the remote to use as mouse buttons are currently used as up, down, left & right & I'd don't want to see these. Appreciate any ideas. Thanks.
Why do you need to right click when you don't use a mouse ?

In most cases right clicking with a mouse is used to access the context menu in a list, so simply map the menu button on your remote to bring up the context menu.

You also don't mention what you're using as a receiver for the remote, as the Pi does not have a built in IR receiver...
I have already mapped the button that would be a right click to access the context menu. Problem is, as said, When I press this button it acts as a right click & as the mouse isn't pointed over the item (as there is no mouse) it doesn't do what it should.

Is there another button to bring up the context menu I could map?
I don't think you're getting what I'm saying. Don't try to map a right click - because you're not using a mouse a right click action is no use to you.

You need to map a button to the context menu. Then when you use the arrow buttons to select an item from a list the menu button will then bring up the context menu for that item.

You still didn't say what you're using as a receiver for the Harmony remote - depending on what you use you'll need different key mappings.

I use CEC with my Pi with the TV remote, I map the yellow C button as the context menu - here is a portion of my remote.xml as an example:

Code:
<keymap>
  <global>
    <remote>
      <red>XBMC.ActivateWindow(Home)</red>
      <green>noop</green>
      <yellow>ContextMenu</yellow>
      <blue>Info</blue>
      <guide>FullScreen</guide>
      <title>Back</title>
      <back>PreviousMenu</back>
    </remote>
  </global>
</keymap>

It would be helpful if you post your remote.xml so people can see what you're doing.
Grrr OK, give up, spent around 2 - 3 hrs reconiguring my harmony 650 & my PC remote trying to bring up this context menu on my Harmony via Open Elec.

I am using this remote control as my source - http://www.htpcbeginner.com/simple-cheap...e-control/

I have programmed my Harmony 650 to do all that this remote can & all is good. But on this remote I cannot find anyway to bring up the context menu other than to move the mouse over the menu item & then hold right click.

On the wikki right click, guide or enter will bring up the context menu but for me nowt.

Where can I find remote.xml, I searched my XBMC folders but couldn't find it?
Of those two remotes, do you have the small black one or the larger silver one ? Are there any buttons that are not currently in use that you could dedicated for the context menu - for example the windows logo button ? Or one of the coloured buttons ?

Do you know whether that remote/receiver presents itself as a keyboard device (all button presses are interpreted as keyboard keys) or as a media remote control ? (buttons send special media events in windows, like play/pause etc) Knowing how the remote presents itself is important because you need to know whether XBMC will be seeing it as a remote, a keyboard, a mouse or a combination of the three.

The best way to find what the remote is sending to XBMC is to turn on debugging mode, monitor the xbmc log and then press buttons to see what it gets logged as.

I'm not too familiar with OpenElec (I use Raspbmc, which locates files in different locations) but the first thing you want to do is enable debugging mode in XBMC - you'll find this under Settings->System->Debugging.

Next you'll want to log in remotely using SSH, I'm assuming you already know how to do this. When logged in you want to "tail" the log file so you can see it update in real time as you press buttons.

Two possible ways are to use tail or less - I'm not sure which ones are available on OpenElec.

According to a forum post I read OpenElec stores its xbmc log file here: /storage/.xbmc/temp/xbmc.log

So you want to either:

Code:
tail -f /storage/.xbmc/temp/xbmc.log

OR

Code:
less /storage/.xbmc/temp/xbmc.log

In the case of less press capital F to put it in follow mode.

Once you've done that press the buttons on the remote including the one you'd like to use as a menu button and see how they are being logged. Let us know.

As for remote.xml - you won't find one unless you create it as it doesn't exit by default. It looks like on OpenElec you should place a remote.xml here:

/storage/.xbmc/userdata/keymaps/

As I don't use OpenElec myself I'm not 100% sure of the locations. If the device presents itself as a remote control you want a remote.xml file, however if it presents itself as a keyboard you need a keyboard.xml file.

There's some extensive information of keymaps/remote maps here, but it's pretty heavy going:

http://wiki.xbmc.org/index.php?title=Keyboard.xml

If you can report what your buttons are being logged as someone can probably give you suggestions of the best way to map it - key/button mappings in xbmc are infinitely customisable if you put the time into figuring out how it works.

One final option you have if you just can't get your amazon remote working to your satisfaction, is to enable CEC support on your TV (assuming it has it) and use the CEC function of your TV's remote to control XBMC - you can then learn the buttons from your TV remote on your Harmony.

I use the TV remote with CEC on my Raspberry Pi, and by using a remote.xml file I've customised the function of the four coloured buttons and a few others to my liking. Most of the basic functions like play/pause/stop etc work as is, I was only missing the context menu and info functions before creating a custom remote.xml to map them to two of the coloured buttons.
Thanks for the comprehensive post. Unfortunately I have no idea how to SSH in, I've only just managed to view the files on my Pi via windows file explorer.
My remote is the small black one. I'm not sure if it sends the keys as keyboard presses or as a media remote, but as far as my Harmony goes it's a Media Center Remote but I have had to teach my Harmony it's codes?

I do have several spare buttons on the remote & I've tried mapping these to guide but as said I can't find any button on the MCR that will bring up the context menu. If I could find this I could map it?

Does anyone have one of these remotes working & if so would it be possible to copy that onto my Pi.

Lastly what do you mean by CEC? This might be an answer but not sure what to do?
CEC is newer tech that allows 1 brand's remote (i.e. Samsung TV) to universally control another brand's device (i.e. Sony DVD player). Most new TVs support CEC and so does the Pi.

Instead of finding the keymap file and everything else mentioned above, have you tried using this addon to map your remote? http://forum.xbmc.org/showthread.php?tid...ght=remote You could then assign the windows, internet explorer, or whatever button on the remote that you currently don't use to now bring up the context menu.
(2014-10-15, 19:38)TechHeadSteve Wrote: [ -> ]Thanks for the comprehensive post. Unfortunately I have no idea how to SSH in, I've only just managed to view the files on my Pi via windows file explorer.
My remote is the small black one. I'm not sure if it sends the keys as keyboard presses or as a media remote, but as far as my Harmony goes it's a Media Center Remote but I have had to teach my Harmony it's codes?

This might help:

http://htpcbuild.com/htpc-software/raspb...nelec-ssh/
I HAVE THE MINI WIRELESS KEYBOARD AND I CAN'T RIGHT CLICK EITHER.
WHEN YOU TRY TO RIGHT CLICK ON THE MOUSE PAD, IT ACTS AS IF ITS A RETURN KEY.
THEREFORE I CANT PULL UP THE SETTING MENU UNDER A INSTALLED PROGRAM.
IM WONDERING IF THERE IS A WAY TO MAP THE KEYBOARD TO DO WHAT I NEED IT TO DO.
ONLY ABOUT 90% OF THE KEYBOARD COMMANDS ARE CORRECT AND THE MAIN COMMAND I NEED ISN'T WORKING.
IM RUNNING XBMC OR KODI ON THE MX 3 TV BOX.
Apparently your caps lock key isn't working either! Wink
I'm using a couple of the small black variety.
My keyboard.xml is
Code:
<keymap>
<global>
<keyboard>
<one mod="ctrl,alt">Notification(Key Pressed, Ctrl+Alt+one, 5)</one> <!--Green -->
<two mod="ctrl,alt">Notification(Key Pressed, Ctrl+Alt+two, 5)</two> <!--Orange -->
<three mod="ctrl,alt">Notification(Key Pressed, Ctrl+Alt+three, 5)</three> <!--Blue -->
<four mod="ctrl,alt">reloadkeymaps</four> <!-- Yellow (helpful for testing this file) -->
<f4 mod="alt">Close</f4> <!-- The [X] Button-->
<o mod="ctrl">ContextMenu</o> <!-- The Open Folder button-->
<tab>XBMC.ActivateWindow(Home)</tab> <!-- Tab -->
<d>toggledebug</d>
<e mod="meta">Info</e> <!-- The My PC Button -->
<tab mod="alt">OSD</tab> <!-- The Multi-Window Button -->
<return mod="alt">FullScreen</return> <!-- The Full Screen Button -->
<f13>Mute</f13> <!-- Mute button -->
<f14>VolumeDown</f14> <!-- Volume down button -->
</keyboard>
</global>
<FullscreenVideo>
<keyboard>
<one mod="ctrl,alt">CodecInfo</one> <!-- Green -->
<two mod="ctrl,alt">ShowSubtitles</two> <!-- Orange -->
<three mod="ctrl,alt">SubtitleDelayMinus</three> <!-- Blue -->
<four mod="ctrl,alt">SubtitleDelayPlus</four> <!-- Yellow -->
<pageup>BigStepForward</pageup>
<pagedown>BigStepBack</pagedown>
<next_track>StepForward</next_track>
<prev_track>StepBack</prev_track>
<v>Mute</v>
</keyboard>
</FullscreenVideo>
</keymap>

You'll find that not all the keys can be mapped, and some of them 'overlap'
Especially beware of touching the numlock, as it sends the unit into different modes.
(2014-10-13, 20:44)TechHeadSteve Wrote: [ -> ]I'm using a Logitech Harmony remote & all is good except for the right click option.

When I press the button that I have associated with right click it won't do the command. The reason is because it will only right click where the mouse pointer is & as my remote doesn't use the mouse feature the mouse cursor just stays where it loads by default.

Is there away around this, the only buttons I could configure on the remote to use as mouse buttons are currently used as up, down, left & right & I'd don't want to see these. Appreciate any ideas. Thanks.

While holding the left click down right click. Your menu should come up. Sometimes takes a few tries.
I have an image of Steve draped over his pi, a shadow of the man he used to be.
'Three years I've been trying to get that menu to come up. You've saved my life... I love you Kristen.'
There are several hoops to jump through, but I made this work for me (not on a Raspberry Pi though). When I press right-click on my remote, it now triggers a corresponding action as dictated by my keymap xml configuration.

See my Kodi forum thread at Linux -  How to map your remote's "right click" to an action (by making it a key).