Kodi Community Forum

Full Version: XBMC gets dedicated remote - Motorola Nyxboard
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
mat____ Wrote:It was order 234


jhsrennie: I'll try that, it does seem like the file is being ignored.

Ned Scott: Point taken, however the blurb says it's designed for XBMC, so I would have thought it an unreasonable assumption to think that pressing the play button would mean play in XBMC, not launch itunes (or play it if already running)

The MMFix file you link to patches out the itunes launch functionaluty from rcd.app which stops the play button on the remote (and the mac keyboard) from launching itunes. However, if it's already running then itunes will still 'hear' the play command and start playing something.

I patch to rcd.app that would launch XBMC if play was pressed and which would pass the play/pause button to xbmc instead of itunes would be quite useful, unless apple have the sources available for the rcd binary, we may be out of luck on that one.

Besides, stop is'nt working in either iTunes or XBMC.

Sorry for this hassle, I'm not a mac user but given it used standard multimedia keys it was assumed by me that this would not be a problem for a mac. Clearly I was wrong in this assumption and will update the blurb on the website.

It seems there are ways of making XBMC get these keys and I am looking into the implementation with other dev's
jhsrennie Wrote:A thought: the Nyxboard uses it's own system keymap file, keyboard.nyxboard.xml, and I'm not sure whether it reads the userdata keyboard.xml or not. You could try changing the file to:

Code:
<keymap>
  <global>
    <keyboard name="Motorola Nyxboard Hybrid">
   ...
JR

Ah, that did it, the keypresses are being interpreted again, and I've mapped Pause and Stop to EPG and USER for now, so all is good again.

Malard, thanks I appreciate your efforts, Apple's ease of use often causes problems when you want to, you know, use the damn thing!
Kevo Wrote:I'm not having any problems with range. I sit about 10ft away.

Latest nightlies seem to have killed the info button for me.

Also is there anyway to stop the power button from putting the machine into standby?



Edit: someone mentioned separate play/pause on the sky+ remote. I've just put pause on the nyxboard. It pause /resumes fine. Real need for play, though I out it on skip forward anyway.


Anyone comment on these?
Kevo Wrote:Anyone comment on these?

That's going to depend on you OS. I an find no way at all to change the behaviour of the power button in OSX. But its easy in windows and linux.

The power button on the remote instructs the host computer to behave just like if you press the soft power button on the computer itself.

Default for this on a Mac is pop a dialog box asking what you want to do, on windows it's sleep and on linux.... well, it depends on the distro. SO, if youre running windows then just use the control panel to change the power button function to "do nothing' and then you're set.


EDIT:
As for the INFO button, yes, since lastnight's build that no longer works for me too. It sends a CTRL-D keypress rather than "i" so all it takes to fix it is to add the function to the keymap.xml. For completeness, here's my file now...

Code:
<keymap>
  <global>
    <keyboard name="Motorola Nyxboard Hybrid">
      <f3 mod="shift">ContextMenu</f3>           <!-- RED     Context menu         -->
      <f4 mod="shift">FullScreen</f4>            <!-- GREEN   Display menu overlay -->
      <f5 mod="shift">ShowSubtitles</f5>         <!-- YELLOW  Subtitles            -->
      <f6 mod="shift">AudioNextLanguage</f6>     <!-- BLUE    Switch audio track   -->
      <home>XBMC.ActivateWindow(Home)</home>     <!-- MENU    Jump to main menu    -->
      <d mod="ctrl">Info</d>                     <!-- INFO    Info                 -->
      <f3>Pause</f3>                             <!-- EPG     Pause                -->
      <f4>Stop</f4>                              <!-- USER    Stop                 -->
    </keyboard>
  </global>
</keymap>

I have a few files with multiple audio streams for directors commentary and the like, which is why I have the AudioNextLanguage defined, but of course you can set whatever you like.
A few other things have broken for me so if gone back a few versions to one using "leftshift"

Thanks though, has helped me get it working how I want.

And on windows the power key sends the same as the sleep button not power, that's what confused me.
Kevo Wrote:A few other things have broken for me so if gone back a few versions to one using "leftshift"

Thanks though, has helped me get it working how I want.

And on windows the power key sends the same as the sleep button not power, that's what confused me.

I don't think so, I think your settup may do this but Windows 7 can be set to do different things from the power button. Check in "Control Panel > Power Settings" A power button press and sleep button press can be configured to do different things and are different commands "sent to the OS" but your settup just has them output the same thing.
Malard Wrote:mat____ see: https://github.com/xbmc/xbmc/commit/fc54...bda4cb88eb

Interesting, from looking at the source code it looks like, well honestly I'm not too sure but I think it's code to allow the native button codes to be intercepted by xbmc before osx starts interpreting them, is that right?

Looks good either way, will try the Oct 03 build when it's ready and see how it works. Should I remove the temporary keymapping that I've been using?
josh4trunks Wrote:I don't think so, I think your settup may do this but Windows 7 can be set to do different things from the power button. Check in "Control Panel > Power Settings" A power button press and sleep button press can be configured to do different things and are different commands "sent to the OS" but your settup just has them output the same thing.

What I meant was changing the windows settings for the "When I press the power button" didnt change the effect of the remote. I had to change the setting for "When I press the sleep button" instead.

Image
Kevo Wrote:What I meant was changing the windows settings for the "When I press the power button" didnt change the effect of the remote. I had to change the setting for "When I press the sleep button" instead.
Quite right Kevo, the power button on the remote does send the signal for sleep. I think I said it did power earlier - I was wrong.
Right, running the most recent build, the new "peripherals" section in input devices can be activated and the Nyxboard remote appears there with the ability to define the USER key and a couple of other things. Pretty cool.
Additionally, the play/pause button is being seen by xbmc and is not passed down to a running iTunes instance, which is lovely.

Thanks Malard, I assume you've done the coding for this? or was it davilla, hard to say sometimes with github.

Anyway, with good news comes the other stuff, so I'd like to suggest that the four colour buttons on the remote be definable in Peripherals in the same way as USER, and also I'm still having an issue with the STOP button doing nothing at all. It makes the light flash but it seems to send no signal, XBMC logs see nothing, and when XBMC's no running it seems to do nothing for itunes either.

I'll take it into work tomorrow and try it on a windows machine; I'm beginning to suspect a fault with that code, which would suck.

I'm happy to see the progress with this though, I was concerned that the coming feature freeze would cause problems.
mat____ Wrote:Right, running the most recent build, the new "peripherals" section in input devices can be activated and the Nyxboard remote appears there with the ability to define the USER key and a couple of other things. Pretty cool.
Additionally, the play/pause button is being seen by xbmc and is not passed down to a running iTunes instance, which is lovely.

Thanks Malard, I assume you've done the coding for this? or was it davilla, hard to say sometimes with github.

Anyway, with good news comes the other stuff, so I'd like to suggest that the four colour buttons on the remote be definable in Peripherals in the same way as USER, and also I'm still having an issue with the STOP button doing nothing at all. It makes the light flash but it seems to send no signal, XBMC logs see nothing, and when XBMC's no running it seems to do nothing for itunes either.

I'll take it into work tomorrow and try it on a windows machine; I'm beginning to suspect a fault with that code, which would suck.

I'm happy to see the progress with this though, I was concerned that the coming feature freeze would cause problems.

davilla did the work so thank him, when he is online I will discuss regarding the stop button.

We will open up more config in the peripherals section over time, but you can set this in the keymap file already if you need to
A little further playing with the remote and I've now got it setup so that the USER button now launches XBMC if it's not running, and quits it if it is. It's actually quite easy, here's how:

Simple part, quitting XBMC. Define USER in the 'peripherals' menu as: XBMC.ShutDown()
Trickier part, launching it. Two staged attack here, first make a service that launches XBMC, then assign a keyboard shortcut (F4 in this case) to that service.

To do this, launch Automator, make a new service and set the "service receives" setting to "no input" then look for "launch application" in the actions list, double click it and select XBMC as the application. File|Save as "LaunchXBMC" and then exit Automator

Now launch System Preferences and Keyboard|Keyboard Shortcuts|Services, scroll to bottom, double click the whitespace in the right column for your new entry, press F4, tick the entry and close System Preferences and you're done.


This isnt completely specific to the Nyxboard remote, you could tweak this idea to work with anything else, and be careful, there's no confirmation on that exit command, it just quits right away.
Hope that helps someone.
So I received my replacement about 30 days ago, finally had more than thirty minutes to myself to figure why this one didn't work either. Step one, like Malard has said about 5 pages back: replace the batteries, they suck. The replacement dispatched does work for me, but only within a range of about 18 inches. Anyone want to buy a very lightly used Nyxboard?
mat____ Wrote:Interesting, from looking at the source code it looks like, well honestly I'm not too sure but I think it's code to allow the native button codes to be intercepted by xbmc before osx starts interpreting them, is that right?

Looks good either way, will try the Oct 03 build when it's ready and see how it works. Should I remove the temporary keymapping that I've been using?

Correct, this installs a tap on cocoa system events and grabs the media buttons before they can propagate to other apps, i.e iTunes.

Handling stop remains elusive, even if I tap all events, I'm not seeing an event that corresponds to the stop button. Time to get out the big guns.