INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Feature request: command +, - for volume adjust  (Read 2263 times)

bobkatz

  • World Citizen
  • ***
  • Posts: 213
Feature request: command +, - for volume adjust
« on: June 28, 2015, 06:10:09 am »

This would follow the precedent in the PC version that uses ctrl + and ctrl -

Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Feature request: command +, - for volume adjust
« Reply #1 on: June 28, 2015, 08:45:27 am »

You can map almost any Media Center function to *almost* any key on the keyboard yourself, using the Resources.xml file.  I've mapped a number of keys, including the volume keys.  For volume, I used the keys that are used by other mac apps (like VLC and itunes).  Those keys are Command-UpArrow and Command-DownArrow respectively.

I have tried, repeatedly, to map Command-+ and Command-- (command and the - key) to volume, but it doesn't work.  I think that the JRiver MC definition of + and - is "off" somehow.  It's either being squashed by a system mapping that's already there or something else is odd.

To map your own keys, you need to have a Resource.xml file in the right place, to start with.  You want the file in your personal Library directory at:

~/Library/Application Support/J River/Media Center 20/Data/Custom Resources/Resource.xml

The ~ means to start at your own home directory.  You can get to your Library directory from Finder by using the "Go" menu.  Choose  Go > Go To Folder .  Then type "~/Library" (no quotes) and it will take you there.

To get a Resource.xml file to start with, get the sample one from here:

ftp://ftp.jriver.com/pub/downloads/music/misc/Resource.xml

Next, add your custom keys at the bottom with the other key map entries.  Here are my definitions that make Command-Up and Command-Down do volume control:

<Entry Key="Ctrl;Up" Command="10018" Param="5" />
<Entry Key="Ctrl;Down" Command="10019" Param="5" />

Finally, here are full instructions on key mapping for MC:

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

Good luck and let us know how you do!

Brian.
Logged

bobkatz

  • World Citizen
  • ***
  • Posts: 213
Re: Feature request: command +, - for volume adjust
« Reply #2 on: June 28, 2015, 11:17:59 am »

You can map almost any Media Center function to *almost* any key on the keyboard yourself, using the Resources.xml file.  I've mapped a number of keys, including the volume keys.  For volume, I used the keys that are used by other mac apps (like VLC and itunes).  Those keys are Command-UpArrow and Command-DownArrow respectively.

SNIP



Thanks, Brian. Do you know if spacebar to alternate start/stop is possible through this XML? I suspect it will need a custom context-sensitive coding. I thought Matt was going to implement that on the PC side. Spacebar works for me when playing a movie but does not seem to work when simply playing music. So for now on the PC I'm stuck with the awkward ctrl-s and ctrl-p.

I'll do command-up and down arrow, I can get used to that. Does anyone know if there is an equivalent XML file on the PC side so I can make things conform, more or less? Habits die hard.
Logged

bobkatz

  • World Citizen
  • ***
  • Posts: 213
Re: Feature request: command +, - for volume adjust
« Reply #3 on: June 28, 2015, 11:23:47 am »

Oh, I just discovered this thread

http://yabb.jriver.com/interact/index.php?topic=98402.0;topicseen

which shows how to do play/pause with spacebar. It's my lucky day!
Logged

bobkatz

  • World Citizen
  • ***
  • Posts: 213
Re: Feature request: command +, - for volume adjust
« Reply #4 on: June 28, 2015, 11:50:26 am »

Oh, I just discovered this thread

http://yabb.jriver.com/interact/index.php?topic=98402.0;topicseen

which shows how to do play/pause with spacebar. It's my lucky day!

Expanding on to other keycommands now that play/pause is conquered. Many thanks, guys!

Well, I just customized my XML file thanks to all the examples. ctrl-up, ctrl-down and command-up, command-down work equally although ctrl is mapped in the XML file.  But, and this is weird, they work in reverse, up arrow drops the level and vice versa. I reversed the file and it still comes out reversed, which is even weirder. I DID quit JRiver between modifications of the Resource.xml file:
<!-- Volume Up and Down 5% -->
    <Entry Key="Ctrl;Up" Command="10018" Param="5" />
    <Entry Key="Ctrl;Down" Command="10019" Param="5" />

Weird, huh?  Actually, even the key built into the example file ctrl-D for DSP studio is not working.

Aha, I just stumbled on ctrl-left and ctrl-right also changing volume 0.5 dB, and this time it's somewhat logical, if you're right handed  :-).

I'm not sure if my XML file is working. I put the new keyboard entries at the end, after </ACCELERATORS> and before </MJRS>

This is the file in ~Library/Application/Support/JRiver/Media Center 20/Data/Custom Resources/Resource.xml

Is there something special required to activate this file?
Logged

bobkatz

  • World Citizen
  • ***
  • Posts: 213
Re: Feature request: command +, - for volume adjust
« Reply #5 on: June 28, 2015, 11:52:43 am »

Neither the volume command nor the spacebar command are intercepted the first time you try to use them. I have to move the volume with the mouse and then I can use the keystroke.
Logged

bobkatz

  • World Citizen
  • ***
  • Posts: 213
Re: Feature request: command +, - for volume adjust
« Reply #6 on: June 28, 2015, 12:00:16 pm »

Neither the volume command nor the spacebar command are intercepted the first time you try to use them. I have to move the volume with the mouse and then I can use the keystroke.

It's a matter of focus. Now I've got MC20 selecting next selection in the list instead of controlling the volume. And I can't get out of that mode so ctrl- any arrow is not working on the volume.

Help...  It's a puzzler.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Feature request: command +, - for volume adjust
« Reply #7 on: June 28, 2015, 12:15:22 pm »

A couple of things to help you out.

1.  In the XML file, the modifier "ctrl" means the Control key under Windows ONLY.  On the Mac, "ctrl" maps to the Command key.  Also known as the Apple Key or Clover Key.  It's the on immediately to the left and right of the space bar on most Mac keyboards.
2.  All of these mappings must be placed into the file in the Accelerators section.  That's the section between the markers <ACCELERATORS> and </ACCELERATORS> .  Otherwise, they probably won't do anything.  So put those mappings above the </ACCELERATORS> marker and you should be ok.
3.  Spacebar is kind of a special case, since you want to be able to type a space in some parts of the interface like the search box and other places.  I have it mapped (in that other thread you found) such that it will do Play/Pause in pretty much any part of the interface except where you might be typing text.  So it should work as expected, but if you find something I haven't, let me know.

Thanks,

Brian.
Logged
Pages: [1]   Go Up