INTERACT FORUM

More => Old Versions => JRiver Media Center 21 for Windows => Topic started by: sdmarquart on July 20, 2015, 12:06:49 pm

Title: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: sdmarquart on July 20, 2015, 12:06:49 pm
I noticed that when playing music through JRiver the space bar on my keyboard doesn't work with start and stop commands.

This is a basic request to get this implemented.

Thanks,
Spencer
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: ferday on July 20, 2015, 12:07:51 pm
works fine for me...

Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: sdmarquart on July 20, 2015, 12:09:26 pm
Weird. I do have itunes normally opened and minimized but when I click on the JRiver program and play a song the space bar doesn't work to "stop" the song. Maybe it's a conflict with having itunes opened since it's always worked fine for that program??
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: keenan on July 20, 2015, 03:39:36 pm
Note that the spacebar doesn't seem to have a function when navigating a file tree or something similar. When you click inside the display window and then press spacebar, does it play/pause like it should?

A new feature would be to support spacebar in all/most views while MC is open.
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: Hendrik on July 20, 2015, 03:54:30 pm
We do support this as long as it wouldn't break any other functionality, which means as long as you don't focus an edit box or any other control which normally responds to the space bar, it already can act as a Play/Pause toggle.
Any more would be very disruptive.
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: sdmarquart on July 20, 2015, 03:59:14 pm
"Note that the spacebar doesn't seem to have a function when navigating a file tree or something similar. When you click inside the display window and then press spacebar, does it play/pause like it should?"

I just did a test and it confirms this. If I hover the mouse pointer over the "display" column in the bottom left hand corner, the space bar works. If I play my music from the "recent albums", "artists" or "albums" audio tab and my mouse is not over the "display" column the space bar doesn't work.

I'd sure love to be able to go to an album and double click to play and then use the spacebar to stop without having to hover over the display column.

Thanks for your input.

Spence
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: blgentry on July 20, 2015, 04:15:08 pm
This was frustrating for me for a while too.  Especially because I use Media Center on the Mac and the answer to my problem wasn't quite as easy.  Here's the deal:

Play/Pause with spacebar is implemented by default, as you have seen.  However, if you are clicked into any area of the interface that can use spacebar for some other function, it overrides this and uses the spacebar for other things.  Like in the Navigation area, spacebar expands and contracts tree views.  I have ZERO reason to use the spacebar for navigation, even though I love keyboard shortcuts.  Frankly, I think it's rather backwards that JRiver does this.  It's backwards from every other player on the planet.

So I've remapped spacebar to override almost every function it has in MC and replace it with Play/Pause.  I've kept the ability to type a space into entry fields like search, Tags, etc.  So my spacebar doesn't do navigation, or any other "special" functions.  It just does Play/Pause (almost everywhere) and types a literal space character in key entry fields.  This is perfect for my needs.  If you want to do this yourself, here's how:

You need to copy a template file into a Custom Resources directory so JRiver can read it and then read your keyboard mappings from it.  See here for a template and the location to copy it to:

http://wiki.jriver.com/index.php/User_Defined_Global_Keyboard_Shortcuts

Once you've done that, go to the bottom of the file and find the Accelerators section.  I like putting my keyboard mappings at the bottom of that section (on a line before the </Accelerators> marker).  Here's my keyboard mapping for space bar:

Code: [Select]
<!-- Play/Pause -->
<Entry Key="Space" Command="10000" Param="0" TranslateFlags="21" />

It's kind of a medium high amount of effort just to map one key.  But for me, it was totally worth it.  Hopefully I've saved you about 90% of the research I had to do to figure it out.  :)

Good luck!

Brian.
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: audunth on July 20, 2015, 05:28:18 pm
Under General -> Behavior there's a Jump on Play option. Set that to Display View and spacebar should work. It miight work in Playing Now too. CTRL-P and CTRL-S will always work for Play/Stop.
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: sdmarquart on July 20, 2015, 07:53:53 pm
Thanks guys. I will look at the options you mentioned and report back..
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: sdmarquart on July 21, 2015, 07:27:07 am
This was frustrating for me for a while too.  Especially because I use Media Center on the Mac and the answer to my problem wasn't quite as easy.  Here's the deal:

Play/Pause with spacebar is implemented by default, as you have seen.  However, if you are clicked into any area of the interface that can use spacebar for some other function, it overrides this and uses the spacebar for other things.  Like in the Navigation area, spacebar expands and contracts tree views.  I have ZERO reason to use the spacebar for navigation, even though I love keyboard shortcuts.  Frankly, I think it's rather backwards that JRiver does this.  It's backwards from every other player on the planet.

So I've remapped spacebar to override almost every function it has in MC and replace it with Play/Pause.  I've kept the ability to type a space into entry fields like search, Tags, etc.  So my spacebar doesn't do navigation, or any other "special" functions.  It just does Play/Pause (almost everywhere) and types a literal space character in key entry fields.  This is perfect for my needs.  If you want to do this yourself, here's how:

You need to copy a template file into a Custom Resources directory so JRiver can read it and then read your keyboard mappings from it.  See here for a template and the location to copy it to:

http://wiki.jriver.com/index.php/User_Defined_Global_Keyboard_Shortcuts

Once you've done that, go to the bottom of the file and find the Accelerators section.  I like putting my keyboard mappings at the bottom of that section (on a line before the </Accelerators> marker).  Here's my keyboard mapping for space bar:

Code: [Select]
<!-- Play/Pause -->
<Entry Key="Space" Command="10000" Param="0" TranslateFlags="21" />

It's kind of a medium high amount of effort just to map one key.  But for me, it was totally worth it.  Hopefully I've saved you about 90% of the research I had to do to figure it out.  :)

Good luck!

Brian.

I copied "
Code: [Select]
<!-- Play/Pause -->
<Entry Key="Space" Command="10000" Param="0" TranslateFlags="21" />
" as you mentioned in the resources.xml file where you stated and it didn't seem to change anything? Let me know if I'm missing something here.

Thanks,
Spence
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: blgentry on July 21, 2015, 08:32:34 am
You created the new Resource.xml file?  ...and put it where the instructions say to?  Did you restart MC?  MC only reads these files on startup, so you have to stop and restart MC any time you make a change to Resource.xml.

Two other notes:

1.  There are a dozen or more new key mappings in the sample Resource.xml file.  You might try one of those keys to make sure MC is reading that file.  The control-numberpad keys for player transport might be the most obvious ones to try.
2.  The instructions reference a directory for MC version 16.  You'll obviously want to replace the 16 with 20 for MC version 20.

I hope this works for you.

Brian.
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: sdmarquart on July 21, 2015, 09:59:04 am
Awesome! Thanks Brian. I only closed the JRiver window and not the Media Server. After closing the Media Server and re-opening it works perfectly. Appreciate your hard work and hopefully others will benefit from your instructions too.

Spencer
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: sdmarquart on July 21, 2015, 11:44:47 am
Okay. Help! Looks like after modifying the resource.xml - I can't add artwork, analyze audio, etc... Is there a way to revert back to the resource.xml that comes with the latest version of JRiver 20. I can copy that into the folder and overwrite what's currently out there.

Thanks!
Spencer
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: sdmarquart on July 21, 2015, 11:53:53 am
Can I simply re-install the latest version of JRiver and it will overwrite & fix the "resource.xml" file?

Thanks.
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: blgentry on July 21, 2015, 12:32:00 pm
The Resources file you added is in the Custom Resources directory.  If you just erase that file (or move it to another directory), then stop and start MC, you should be fine.  There should be no reason to reinstall or anything more drastic.

MC has two Resource files.  One that has all of the "stock" settings in it.  You never touch that file.  The other, in Custom Resources, is what you edit to add or change things the way you want them.  So just working with that file (moving it, or deleting it) should fix your issue if it's related to the Resource file that you added.

If you take it step by step, you can almost certainly get this working the way you want it.  Let us know if we can help.

Brian.
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: sdmarquart on July 21, 2015, 01:05:54 pm
So after I created the "custom resources" folder, it now uses that the "resource.xml" in that folder and not the one in "default resources"? I'm confused. I'd like to revert to the original "resource.xml" file so I can right click on an album and tag, add cover art, delete, analyze audio etc.. For whatever reason all those options are no longer there. What if I delete the "custom resources" folder? It looks like the commands since I modified are using an old version of MC?

Appears I'm an idiot and modifed the resource.xml file in the "default resources" folder. Even after deleting the "custom resources" folder, it's still not working correctly after restarting.

Thanks for the help so far and let me know my best option. If I need to re-install, no big deal just wanna get it fixed.

Spence
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: sdmarquart on July 21, 2015, 01:41:17 pm
Fixed! Simply re-installed and added the resource file (with Brian's changes) to the "Custom Resources" folder. All working. Sorry for the brain fart. I was on my first cup of coffee this morning when I did this originally. All good.

I assume that the "Custom Resources" folder will be fine for future updates?

This is a great fix so thanks Brian!

Spencer
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: blgentry on July 21, 2015, 04:05:51 pm
I assume that the "Custom Resources" folder will be fine for future updates?

Yes, this file will be preserved between upgrades of Media Center (version 20).  You can add new key mappings to it if you want to.  To answer your previous question:  The two Resource files are merged by the program.  It reads them both.  The Custom one gets priority.  So if a key is already defined by default, you can override it in the Resource file in the Custom Resources directory.

Quote
This is a great fix so thanks Brian!

Good job getting it working.  I'm glad it's working for you as it does for me.  :)

Brian.
Title: Re: Request: Space bar for Windows computer to "Stop" and "Play" audio from JRiver
Post by: sdmarquart on July 21, 2015, 04:34:13 pm
Yes, this file will be preserved between upgrades of Media Center (version 20).  You can add new key mappings to it if you want to.  To answer your previous question:  The two Resource files are merged by the program.  It reads them both.  The Custom one gets priority.  So if a key is already defined by default, you can override it in the Resource file in the Custom Resources directory.
Brian.

Cool. I totally screwed it up the first time but not I "get" it. Love this program and learning more every day. I plan on upgrading to version 21 soon and if need be, I could re-do a resource file in the custom resources folder.

Thanks again for your help!

Spence