INTERACT FORUM

Please login or register.

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

Author Topic: How to assign a keyboard button to a function?  (Read 10264 times)

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
How to assign a keyboard button to a function?
« on: April 30, 2016, 04:26:53 pm »

How to assign a keyboard button to a function?

1) I'd like to press a key to assign a video preview. For example F10.
2) I'd like to press a key to assign window video screen at 100%, not "fit window" (default). For example F11.
3) I'd like to press a key to assign "jump behaviour: forward 1seg. / backward 1seg.". For example right/left direction keys.

1) when I play a video: Window ==> "use screengrab for thumbnail"
2) when I play a video: Window ==> "100%"

Is it possible?
Thank you and sorry for my poor English one more time
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: How to assign a keyboard button to a function?
« Reply #1 on: May 03, 2016, 09:14:36 am »

Of all of these, I think only #3 is possible.

3) I'd like to press a key to assign "jump behaviour: forward 1seg. / backward 1seg.". For example right/left direction keys.

You can only map the functions that JRiver has built in as core commands.  Once you find the correct core command number, you can then make a keyboard mapping to trigger that command from a key press.  Here's the wiki entry on how to do that:

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

Good luck,

Brian.
Logged

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: How to assign a keyboard button to a function?
« Reply #2 on: May 03, 2016, 11:32:23 am »

thank you!

is it this?:
10034 MCC_SEEK_FORWARD
10035 MCC_SEEK_BACK

In resourse.xml:

    <Entry Command="10034" Text="Jump Forward" />
    <Entry Command="10034" Text="Jump Forward 30 Seconds" Param="30000" />
    <Entry Command="10035" Text="Jump Back" />
    <Entry Command="10035" Text="Jump Back 10 Seconds" Param="10000" />

do I need to change "30 seconds" for "x seconds"? and save it?

is it?
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: How to assign a keyboard button to a function?
« Reply #3 on: May 03, 2016, 11:58:48 am »

You seem to have found the correct core commands for what you want.  But the lines you quoted aren't keyboard mapping lines.  They are something else.

You want to put in lines that look something like this:

Code: [Select]
<Entry Key="Right" Command="10034" Param="10000" />
This one maps the Right arrow key to "skip forward 10 seconds".  The parameter tells it how many miliseconds (thousandths of a second).  So 10000 = 10 seconds .

You want to put the entries closer to the bottom of the file with the rest of the "Entry Key" lines.  I suggest at the bottom of that section so you can find them easily.

Good luck,

Brian.
Logged

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: How to assign a keyboard button to a function?
« Reply #4 on: May 03, 2016, 12:14:00 pm »

You seem to have found the correct core commands for what you want.  But the lines you quoted aren't keyboard mapping lines.  They are something else.

You want to put in lines that look something like this:

Code: [Select]
<Entry Key="Right" Command="10034" Param="10000" />
This one maps the Right arrow key to "skip forward 10 seconds".  The parameter tells it how many miliseconds (thousandths of a second).  So 10000 = 10 seconds .

You want to put the entries closer to the bottom of the file with the rest of the "Entry Key" lines.  I suggest at the bottom of that section so you can find them easily.

Good luck,

Brian.

I'm sorry. I think that I've misunderstood. You only said that I need to add these two lines at the end of the file?

I edit this file:
C:\Program Files (x86)\J River\Media Center 21\Data\Default Resources\Resource.xml

In this file I search this section:
<ACCELERATORS> ==> In this section.
<!-- Playback engine shortcuts (shared) --> In this sub-section I add this 2 lines in the end:

In this section I add this 2 lines in the end of the section:
<Entry Key="Right" Command="10034" Param="1000" />
<Entry Key="Left" Command="10035" Param="1000" />

Nothing original lines erase.
Nothing original lines change.

Is it right now?

thank you!!!

Logged

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: How to assign a keyboard button to a function?
« Reply #5 on: May 03, 2016, 12:36:13 pm »

If I do it this the time for seek is 5-by-5 seconds. Not 1-by-1 seconds. Something is wrong.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: How to assign a keyboard button to a function?
« Reply #6 on: May 03, 2016, 02:37:06 pm »

I inserted the above lines into my Custom Resources/Resource.xml file.  I put them right above the </Accelerators> marker. 

They work as expected, but 1 second jumps are sort of awkward.  The forward jumps either 1 or 2 seconds depending on where it is "in the count".  Backwards usually requires 2 presses to go back one second because the song is continuously advancing, even when you press the backwards button.

Did you create a Custom Resources folder and put the sample Resource.xml file in that folder?

Anyway, it seems to work for me.  I'm using MC21.0.66 on Mac.

Brian.
Logged

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: How to assign a keyboard button to a function?
« Reply #7 on: May 03, 2016, 05:21:35 pm »

I edit this file:
C:\Program Files (x86)\J River\Media Center 21\Data\Default Resources\Resource.xml

In this file I search this section:
<ACCELERATORS>
<!-- Playback engine shortcuts (shared) -->


In this section I add this 2 lines in the end of the section:
<Entry Key="Right" Command="10034" Param="1000" />
<Entry Key="Left" Command="10035" Param="1000" />

Nothing original lines is erased.
Nothing original lines is changed.

The final code of the section is this:

Code: [Select]
   

  <ACCELERATORS>

    <!-- Global shortcuts -->
    <Entry Key="Ctrl;Shift;F12" Command="25015" Param="1" Global="1" />


<!-- Playback engine shortcuts (shared) -->
  

    <Entry Key="+" Command="28000" TranslateFlags="32" />
    <Entry Key="I" Command="28000" TranslateFlags="32" />
    <Entry Key="-" Command="28001" TranslateFlags="32" />
    <Entry Key="O" Command="28001" TranslateFlags="32" />
    <Entry Key="Up" Command="28002" TranslateFlags="32" />
    <Entry Key="Down" Command="28003" TranslateFlags="32" />
    <Entry Key="Left" Command="28004" TranslateFlags="32" />
    <Entry Key="Right" Command="28005" TranslateFlags="32" />
    <Entry Key="Enter" Command="28006" TranslateFlags="32" />
    <Entry Key="A" Command="28022" Param="-1" TranslateFlags="32" />
    <Entry Key="Home" Command="28007" TranslateFlags="32" />
    <Entry Key="End" Command="28008" TranslateFlags="32" />
    <Entry Key="Page Down" Command="28009" TranslateFlags="32" />
    <Entry Key="Page Up" Command="28010" TranslateFlags="32" />
    <Entry Key="Shift;Page Down" Command="28009" TranslateFlags="32" />
    <Entry Key="Shift;Page Up" Command="28010" TranslateFlags="32" />
    <Entry Key="Space" Command="28011" Param="-1" TranslateFlags="401" />

    <Entry Key="Right" Command="10034" Param="1000" />
    <Entry Key="Left" Command="10035" Param="1000" />


With this not work.
Is it necessary create a new xml file?
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: How to assign a keyboard button to a function?
« Reply #8 on: May 03, 2016, 05:25:53 pm »

That file shouldn't be edited to make changes.  I *think* it gets replaced when you do upgrades.  It's definitely not intended to be edited by end users.  Instead, you're supposed to work with this file:

C:\Program Files\J River\Media Center 21\Data\Custom Resources\Resource.xml

You should download sample file and put it there.  You'll probably have to create the "Custom Resources" directory.  There are a few more details about this in the link I posted up above:

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

Good luck!

Brian.
Logged

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: How to assign a keyboard button to a function?
« Reply #9 on: May 03, 2016, 05:36:55 pm »

OK! I've restored the Resource.xml file of Default Resources folder. Nothing is changed here. Virgin file.

I've created the folder "Custom Resources":
C:\Program Files (x86)\J River\Media Center 21\Data\Custom Resources

I've downloaded the file "Resource.xml" of this link: https://wiki.jriver.com/index.php/User_Defined_Global_Keyboard_Shortcuts

I've moved the new file to here:
C:\Program Files (x86)\J River\Media Center 21\Data\Custom Resources\Resource.xml

Now I edit this file and I add this 2 lines:

   <Entry Key="Right" Command="10034" Param="1000" />
   <Entry Key="Left" Command="10035" Param="1000" />


The complete code now is this:

Code: [Select]
  <ACCELERATORS>

    <!-- Make Ctrl;1...4 act like player control buttons -->
    <Entry Key="Ctrl;1" Command="10004" Param="0" Global="1" />
    <Entry Key="Ctrl;NumPad1" Command="10004" Param="0" Global="1" />
    <Entry Key="Ctrl;2" Command="10000" Param="0" Global="1" />
    <Entry Key="Ctrl;NumPad2" Command="10000" Param="0" Global="1" />
    <Entry Key="Ctrl;3" Command="10002" Param="0" Global="1" />
    <Entry Key="Ctrl;NumPad3" Command="10002" Param="0" Global="1" />
    <Entry Key="Ctrl;4" Command="10003" Param="0" Global="1" />
    <Entry Key="Ctrl;NumPad4" Command="10003" Param="0" Global="1" />

    <!-- Make Ctrl;5 show a DVD menu (also to override rating the current song) -->
    <Entry Key="Ctrl;5" Command="10033" Param="0" Global="1" />
    <Entry Key="Ctrl;NumPad5" Command="10033" Param="0" Global="1" />

    <!-- Make Ctrl;6...7 run a program (as an example) -->
    <Entry Key="Ctrl;6" Type="Program" Command="MC13.exe" Param="/Command Pause" Global="1" />
    <Entry Key="Ctrl;7" Type="Program" Command="calc.exe" Global="1" />

    <!-- Make Ctrl;Shift;1...4 play playlists -->
    <Entry Key="Ctrl;Shift;1" Command="30007" Param="Keyboard Playlists\1" Global="1" />
    <Entry Key="Ctrl;Shift;NumPad1" Command="30007" Param="Keyboard Playlists\1" Global="1" />
    <Entry Key="Ctrl;Shift;2" Command="30007" Param="Keyboard Playlists\2" Global="1" />
    <Entry Key="Ctrl;Shift;NumPad2" Command="30007" Param="Keyboard Playlists\2" Global="1" />
    <Entry Key="Ctrl;Shift;3" Command="30007" Param="Keyboard Playlists\3" Global="1" />
    <Entry Key="Ctrl;Shift;NumPad3" Command="30007" Param="Keyboard Playlists\3" Global="1" />
    <Entry Key="Ctrl;Shift;4" Command="30007" Param="Keyboard Playlists\4" Global="1" />
    <Entry Key="Ctrl;Shift;NumPad4" Command="30007" Param="Keyboard Playlists\4" Global="1" />

<Entry Key="Right" Command="10034" Param="1000" />
<Entry Key="Left" Command="10035" Param="1000" />

  </ACCELERATORS>

</MJRS>

NOW seek 1-by-1 second works fine BUT the direction keys Right/Left not work! Now the direction keys of L/R not work. But Up/down keys works fine.

 :'( :'( :'(
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: How to assign a keyboard button to a function?
« Reply #10 on: May 03, 2016, 05:46:56 pm »

NOW seek 1-by-1 second works fine BUT the direction keys Right/Left not work! Now the direction keys of L/R not work. But Up/down keys works fine.

So you normally use the left and right arrows for other things?  Like for navigating around in MC's tree or something?  If so, I think you need to add some translate flags to tell MC when to use your new definition of those keys and when to *ignore* it.  Try something like this:

Code: [Select]
<Entry Key="Right" Command="10034" Param="1000" TranslateFlags="21" />
You might also try 17 for Translate Flags.  I think 21 will do what you want though.

Brian.
Logged

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: How to assign a keyboard button to a function?
« Reply #11 on: May 03, 2016, 05:55:40 pm »

I've tried with this:
Code: [Select]
    <Entry Key="Right" Command="10034" Param="1000" TranslateFlags="17" />
<Entry Key="Left" Command="10035" Param="1000" TranslateFlags="17" />

and this:

Code: [Select]
    <Entry Key="Right" Command="10034" Param="1000" TranslateFlags="21" />
<Entry Key="Left" Command="10035" Param="1000" TranslateFlags="21" />

The result is similar to this:

Code: [Select]
<Entry Key="Right" Command="10034" Param="1000" />
<Entry Key="Left" Command="10035" Param="1000" />

I use a Library View with thumbnails of the covers of the videos. So I need use direction keys L/R and Up/Down when I use the keyboard. I would like use the direction keys L/R normally if it is possible :)

Thank you master!!!

 
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: How to assign a keyboard button to a function?
« Reply #12 on: May 03, 2016, 06:43:22 pm »

The most obvious suggestion is to map your new keys to unused keys.  Like <shift>Right .  Or <control>Right.

Those mappings look like this:

Code: [Select]
<Entry Key="Shift;Right" Command="10034" Param="1000" TranslateFlags="17" />
<Entry Key="Ctrl;Right" Command="10034" Param="1000" TranslateFlags="17" />

These are just examples.  You can come up with keys that make sense to you and your work flow.  I never use the arrow keys when navigating MC; I just use the mouse.  Your use is different than mine.

Good luck!

Brian.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: How to assign a keyboard button to a function?
« Reply #13 on: May 03, 2016, 11:42:44 pm »

How to assign a keyboard button to a function?

Well first, as Brian implied in reply #12 above, you can't just start assigning new functions to keyboard buttons that are already in use by MC, particularly buttons that are as commonly used as the left and right arrows. You need to either find how the button is currently used, and decide if you want to change the existing function, or you need to find buttons that are not used already. That includes buttons that are not used globally by Windows or other applications that are running. For example, you can't assign a new function to Alt-Tab without conflicting with the existing Windows function.

Note also that you can't just add keyboard button combinations at the end of the file, as it is possible to have multiple assignments for the one keyboard combination, and if you do that, the sequence they appear in the file affect which assignment is used. I'm not sure if the first or last assignment is used, as it isn't documented and I haven't tested it. But generally, you should avoid assigning multiple Commands to one Keyboard combination to avoid ambiguity.

The Resource.xml file in the "Custom Resources" directory is the right place to be making changes. This is how I would approach each requirement below:
a) Search the Media Center Core Commands list and find the function you want to use for the requirement. Note that sometimes there is more than one MCC Command that can do the job, so get familiar with the Commands available.

b) Search the Resource.xml file for the MCC Command you have decided to use, to see if it is already defined in the file. There may be more than one instance, and each may use different parameters, so make sure you understand what each is doing. Read the text descriptions in the Resource.xml file, particularly the section on TranslateFlags. Brian has already suggested trying TranslateFlags of 17 and 21. You should understand what that means. 17=16+1 from the table, so the keyboard definition applies to "16: don't translate in IE, VB controls, or other unknown rich controls" and "1: don't translate in edits, comboboxes, and other data entry controls". 21=16+4+1. Every number can only be made up of a unique set of numbers that are to the power of 2. So under the heading "<!-- Playback engine shortcuts (shared) -->" you will see that the "Space" key has a TranslateFlags="401", which equals 256+128+16+1. You should be able to work out from the table what that means.

I find that Notepad++ is an excellent tool for doing searches like this. Much better than plain old Notepad. Notepad++ works much the same as Notepad, but has line numbers, can count all instances of a searched string, can open multiple files, colour codes the display based on the file contents (XML in this case) etc. All good stuff.
Now that you have confirmed that the Command you want to use either hasn't been assigned to a key combination yet, or you understand how it has been assigned and what it means.

c) Search the Resource.xml file for the key combination that you want to use. If you search for the "left" key, you will find that the word is mentioned 7 times, and there are Key="" assignments that include the "Left" key, including Key="Left", Key="Ctrl;Left", Key="Ctrl;Shift;Left", and Key="Alt;Left", and they don't all have the same TranslateFlags so they apply at different times.

The primary assignment, <Entry Key="Left" Command="28004" TranslateFlags="32" />, runs the "MCC_PLAYBACK_ENGINE_LEFT" Command, which I believe is the Command responsible for the "Jump back xx seconds" behaviour, where xx is defined under "Options>Audio>Stop, Seek & Skip>Jump Behavior" for audio, and "Options>Video>Advanced>Jump Behavior" for video. It would not be a good idea to assign a new Command to the "Left" key.

But the "Shift;Left" key combination does not have an assignment to it, so you could use that. The "Ctrl;Left" combination has been used though, so probably shouldn't be reassigned.

Some key combinations could be reassigned though. For example, your requirement 2) probably shouldn't use F11, but F7 has been assigned to the Command 30006 with the line <Entry Key="F7" Command="30006" Param="0" />. That is the "MCC_TUNE_TV" Command, which probably doesn't need a shortcut key combination. So you could edit that assignment and change it to what you need. That is just an example though, not a recommendation. You have to decide which key combinations you want to retain, and which you may be willing to reassign.

d) Once you have the Command selected, including any parameters, and the key combination you want to use, you need to decide in which context it should work, and hence what TranslateFlags should be assigned to it. Use the table in the Resource.xml file to decide that, as described above. For example, your second requirement probably should have TranslateFlags of 1, 4, 16, 32, and 256, so the value in the Resource.xml file should be the sum of all those numbers, which is 309. Now, I'm not sure that is the correct number for your second requirement, but as you should probably only be setting a Window to 100% when playing video in a Detached Window, that is probably a good start. 309 allows the function in Theatre View, (128 is not included in the TranslateFlags) and doesn't limit it to Full Screen (8 is not included in the TranslateFlags), which may or may not be correct. You will have to experiment with the TranslateFlags to get the result you want.


Now, on to your actual requirements. Which Commands to use?

1) I'd like to press a key to assign a video preview. For example F10.
I'm not sure exactly what you want for this one. Play the video and you will see what it is. There isn't really a video Preview in MC, as far as I know. I'm sure you don't mean just a thumbnail, but an actual small version of the video playing somewhere. There is a MCC Command 10031 "MCC_SET_PREVIEW_MODE_SETTINGS", but I don't know how that works. It seems to just be setting the parameters for a preview, so I thought it might be for images only. You could try that.
But the closest thing to a Preview in MC that I could think of was to play the video in Standard View, so that it appears in the Action Window in the bottom left corner. Now that would require two Commands; Play and switch to Standard View. Bottom line on this one, Play the video, then press Ctrl-1 to switch to Standard View, if that meets your requirement.


2) I'd like to press a key to assign window video screen at 100%, not "fit window" (default). For example F11.
MCC Command 28028 "MCC_PLAYBACK_ENGINE_ZOOM_TO_PRESET"     int 0 to fit window, 1 for 100%, 2 for 200%
So if you used "F7" as the keyboard shortcut, edit the existing line in the Resource.xml file to;
<Entry Key="F7" Command="28028" Param="1" TranslateFlags="309" />.

Of course if you meant you just want Full Screen like Internet Explorer does, as opposed to maximising the MC window, then Standard View in MC doesn't do that. However, pressing F11 (or Shift-F11) in Standard View jumps to Full Screen Theatre View, and Shift-F11 jumps back to Standard View with the window sized as it was previously.
Also, if you are using a media keyboard that has a touch pad on it, right clicking on a playing video allows you to select Window>Fit to window/100%/200%.


3) I'd like to press a key to assign "jump behaviour: forward 1seg. / backward 1seg.". For example right/left direction keys.
You found the correct Commands for this, if you want to jump forward and back in a video one second;
10034 MCC_SEEK_FORWARD int nMilliseconds (0 means default -- varies depending on playback type)
10035 MCC_SEEK_BACK int nMilliseconds (0 means default -- varies depending on playback type)


So Brian's suggestion of;
<Entry Key="Shift;Right" Command="10034" Param="1000" TranslateFlags="17" />
<Entry Key="Shift;Left" Command="10035" Param="1000" TranslateFlags="17" />

should work. The TranslateFlags may need to be just 21, or "32: targets playback engine / display (DVD, image playback, etc.)", or might need to be 1+4+16+32=53. Test these.

Note that MCC Commands 10034 and 10035 are already used, but with the Parameter "0", which means to jump forward and backward the default amount of time, usually 30 and 10 seconds respectively. See lines;
<Entry Key="Ctrl;Shift;Right" Command="10034" Param="0" TranslateFlags="17" />
<Entry Key="Ctrl;Shift;Left" Command="10035" Param="0" TranslateFlags="17" />

These work in Standard View, Theatre View, and a Detached Window, while a the plain "Left" and "Right" keys only work in Theatre View, and a Detached Window.

Note that the plain "Left" and "Right" keys use the Commands;
28004 MCC_PLAYBACK_ENGINE_LEFT
28005 MCC_PLAYBACK_ENGINE_RIGHT


and are including in the Resource.xml file as;
<Entry Key="Left" Command="28004" TranslateFlags="32" />
<Entry Key="Right" Command="28005" TranslateFlags="32" />

Targeting just the Playback Engine with TranslateFlags of "32".

Of course if you meant to jump forward or backward one Chapter in a DVD or something, that would be a different MCC Command.


1) when I play a video: Window ==> "use screengrab for thumbnail"
Use MCC Command;
10055 MCC_VIDEO_SCREEN_GRAB 0: use as thumbnail; 1: save as external file


2) when I play a video: Window ==> "100%"
Is this the same as #2 above? Or is this supposed to be "Show 1920x1080 video at 1920x1080 pixels, instead of scaling the video"? Anyway, discussed above. Also note that Ctrl-4 takes you to Theatre View, which is always Full Screen.

Okay, that was probably more than you bargained for, and some of it may not be relevant. But at least that should give you more of an idea about using the Resource.xml file, without breaking other MC functionality.

Apologies Brian for jumping in on this, but I have had to work out some of the above, and haven't seen it written up anywhere. So now was a good time to have a go.  ;D
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

connersw

  • Citizen of the Universe
  • *****
  • Posts: 661
Re: How to assign a keyboard button to a function?
« Reply #14 on: May 04, 2016, 09:39:46 am »

There isn't really a video Preview in MC, as far as I know.

There are too many options...

There actually is in Standard View.  Player -> Preview Mode with a variety of options.  It seems to only work once the file is added to the Playing Now queue though, so I'm not sure if it works the way the OP intends it.  Also, not sure how it applies to MCC Command 10031 "MCC_SET_PREVIEW_MODE_SETTINGS" so someone would need to test it out. 
Logged

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: How to assign a keyboard button to a function?
« Reply #15 on: May 04, 2016, 01:11:21 pm »

Thank you everyone for the information! I will test it!!!

Code: [Select]
<Entry Key="Shift;Right" Command="10034" Param="1000" TranslateFlags="17" />
<Entry Key="Shift;Left" Command="10035" Param="1000" TranslateFlags="17" />
<Entry Key="Shift;Ctrl;C" Command="10055" Param="0" TranslateFlags="8" />
<Entry Key="F7" Command="28028" Param="1" TranslateFlags="309" />.

I use a Keyboard Razer with Macro Keys.
I will assign a macro to macro-keys in the keyboard for do it this.
Can be a good option.

Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: How to assign a keyboard button to a function?
« Reply #16 on: May 04, 2016, 06:47:59 pm »

There are too many options...

There actually is in Standard View.  Player -> Preview Mode with a variety of options.

So there is! I haven't looked at that in aaagggeeesss, and forgot about it. Sort of a neat function, particularly for audio, but it does work for video.

Oh; there can never be too many options!  ;D
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: How to assign a keyboard button to a function?
« Reply #17 on: May 04, 2016, 06:55:19 pm »

Thank you everyone for the information! I will test it!!!

Code: [Select]
<Entry Key="F7" Command="28028" Param="1" TranslateFlags="309" />.
Can be a good option.

I did do a little testing of the 28028 command via the right click menu when watching a video. I'm not sure it will do what you want, as it scales the video correctly, but doesn't resize the window the video is playing in.

As you can see though, there are lots of options in MC. The better you describe what you are trying to do, exactly, then better help you will get from the forum.

So test those and let us know how you go.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: How to assign a keyboard button to a function?
« Reply #18 on: May 04, 2016, 07:05:27 pm »

I did do a little testing of the 28028 command via the right click menu when watching a video. I'm not sure it will do what you want, as it scales the video correctly, but doesn't resize the window the video is playing in.

As you can see though, there are lots of options in MC. The better you describe what you are trying to do, exactly, then better help you will get from the forum.

So test those and let us know how you go.

Thank you very much.

This command is right:
         <Entry Key="F7" Command="28028" Param="1" TranslateFlags="309" />.

When I playing a new video at full screen for default JRiver put in "fit window".
I only want that If I push F7-key I get window at 100% and the other empty window space be black. This is all.

I need do more tests with this. I would like use the key "print screen" of the keyboard for get the thumbnail. But I don't know what is the name of this key. F1, F2, Cntrl, Sift it is easy, but this key I don't know what is the name.



 
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: How to assign a keyboard button to a function?
« Reply #19 on: May 04, 2016, 08:12:25 pm »

I only want that If I push F7-key I get window at 100% and the other empty window space be black. This is all.

Well then it may do what you want. It doesn't change the window size. It just changes the video size. In the attached image I played a video full screen in Theatre View, and then switched to 100% using the right click menu. You can see that the video is playing in the center of a black screen, at the original (pixel count) size of the video, which is what 100% means in this context. But I am still not sure exactly what you want, as I don't understand why you would want a small video in the middle of a big black screen.

I would like use the key "print screen" of the keyboard for get the thumbnail. But I don't know what is the name of this key. F1, F2, Cntrl, Sift it is easy, but this key I don't know what is the name.

The "Print Screen" key is labelled "Prt Scr" on a full sized English keyboard. It is to the right of the F12 key, and above the group of keys that include the Insert, Delete, Home, End, Page Up, and Page Down keys.

I assume that you picked the "Print Screen" key from the list of Special Keys in the Resource.xml file. i.e.
Code: [Select]
  Special key list: Insert, Delete, -, +, Right, Left, Up, Down,
    NumPad0, NumPad1, NumPad2 (etc.), F1, F2, F3 (etc.), Backspace, Enter, Escape,
    Apps, Page Up, Page Down, Home, End, Space, Print Screen, Tab, Multiply ('*' on NumPad),
    Decimal ('.' on NumPad)

It isn't exactly clear what the Special Keys are, but going by the contents of the Resource.xml file, those are the keys that can be used in addition to A to Z and 0 to 9. So keys like , !, @, #, $ %, etc. can't be used.


Note that the "Print Screen" key is already assigned to the 28018 MCC_TV_SNAPSHOT function. See the line;
<Entry Key="Ctrl;Shift;Print Screen" Command="28018" TranslateFlags="32" />
in the Resource.xml file.

It looks like that would take a screenshot of a video during playback, and save it to the Windows clipboard.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: How to assign a keyboard button to a function?
« Reply #20 on: May 05, 2016, 07:03:08 am »

It's right, I only want changes the video size at 100%. Why?
Because I have many clips of low resolution: 600x400, 1300x700, 300x200... I have Nec monitor of 27"/2K only at 30cm (11in) of my eyes. I don't want upscaling of videos of 600*400 to 2K for the low quality image. The image is near of my eyes. I only need 600*400 with good quality, upscaling is not necessary. if I were to see the picture at a great distance then it would not be a good idea. I don't use Theatre View. I use JRiver in pc in room of work, not in the dinning room from the couch.

Thank you for the list of the keys!!!! I need also know the name of the keys m1, m2, m3... of my razer keyboard blackwidow chroma. This keys is not standard. Are keys for macros. I can create a macros via razer software but I would like use j river software for this becauses I would like use this keys (m1, m2..) for another things when jriver is not running. But this is a small problem.

Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: How to assign a keyboard button to a function?
« Reply #21 on: May 05, 2016, 05:44:32 pm »

It's right, I only want changes the video size at 100%. Why?
Because I have many clips of low resolution: 600x400, 1300x700, 300x200...

That is a very good reason. Of course you could play the videos in a Detached Window, accessed via Ctrl-6 in MC, and then you could size and position the video any way you liked. But then you would still see all your desktop clutter around the video, rather than the black surround provided by using the 100% function.

Sorry I can't help with the names of the M1, M2 keys on the Razer. I do know that MC won't be able to use those keys directly, but if you programed key combinations for those keys, and MC used those key combinations for some function, then you could get single key operation of those MC functions. For example, if you programed the M4 key as the combination Shift-Left, and that key combination skipped back in a video, now the M4 key will skip back. But I think you know that already.

Good luck getting it all working as you wish.  8)
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner
Pages: [1]   Go Up