INTERACT FORUM

Please login or register.

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

Author Topic: Help adding a keyboard shortcut  (Read 839 times)

NappyRob

  • Recent member
  • *
  • Posts: 8
Help adding a keyboard shortcut
« on: October 30, 2021, 06:15:50 pm »

I wanted to know what I have to do to create a keyboard shortcut to open media file (Ctrl+A) in Resource.xml, I have read the instructions but I cannot understand what values ​​I have to enter.

Thanks.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Help adding a keyboard shortcut
« Reply #1 on: October 30, 2021, 11:30:34 pm »

It's not very clear what you mean by "...to open media file...". In most scenarios, the "Enter" key should already do that? Also, you seem to desire that "Ctrl+a" be assigned to this task? That combo is universally assigned to "Select all" in just about every program you might ever use where that could be a thing, MC included.

If you were able to provide a little more detail about what you want to control, when, and where, we might be able to offer better advice, if not, the two links below should be able to help you on your journey...

Existing keyboard combos are listed here, adding your own is covered here.

Good luck,
-marko

NappyRob

  • Recent member
  • *
  • Posts: 8
Re: Help adding a keyboard shortcut
« Reply #2 on: October 31, 2021, 04:56:28 am »

It's not very clear what you mean by "...to open media file...". In most scenarios, the "Enter" key should already do that? Also, you seem to desire that "Ctrl+a" be assigned to this task? That combo is universally assigned to "Select all" in just about every program you might ever use where that could be a thing, MC included.

If you were able to provide a little more detail about what you want to control, when, and where, we might be able to offer better advice, if not, the two links below should be able to help you on your journey...

Existing keyboard combos are listed here, adding your own is covered here.

Good luck,
-marko
By "open media file" I mean open the window to select an audio or video file to play, (File -> Open Media File) I have been using Windows Media Player for 20 years and there the command Ctrl+A was also to open the same window to open media files.
I would just like to know what I have to put in the Resources file to activate that key combination.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Help adding a keyboard shortcut
« Reply #3 on: October 31, 2021, 05:56:41 am »

I would just like to know what I have to put in the Resources file to activate that key combination.

This:
Code: [Select]
  <MJRS version="1.0">
 
  <ACCELERATORS>

<!-- Opens the "File>Open media file" dialogue (replaces the default "Select All" command -->
<Entry Key="Ctrl;A" Command="20000" />

  </ACCELERATORS>

</MJRS>

Remembering that you need to create a new Resource.xml file in a "Custom Resources" folder as per instructions linked to in my first reply. If you do not do this, subsequent MC updates will remove any additions you make to the default file.

I have tested this here, and it works as I think you want it to, as in, it opens that dialogue. Mine defaulted to opening in the MC program folder.

I've attached a copy of my own resource file in case you are interested. As well as the Ctrl+a you required (which does replace the existing "Select All" command), it has:
Ctrl+T to toggle the tree open/closed
Ctrl+Alt+D to open explorer at the folder of the selected file, and select that file in said folder.
Ctrl+Alt+R to start a seedless play doctor session (this one is global)

NappyRob

  • Recent member
  • *
  • Posts: 8
Re: Help adding a keyboard shortcut
« Reply #4 on: October 31, 2021, 06:26:32 am »

This:
Code: [Select]
  <MJRS version="1.0">
 
  <ACCELERATORS>

<!-- Opens the "File>Open media file" dialogue (replaces the default "Select All" command -->
<Entry Key="Ctrl;A" Command="20000" />

  </ACCELERATORS>

</MJRS>

Remembering that you need to create a new Resource.xml file in a "Custom Resources" folder as per instructions linked to in my first reply. If you do not do this, subsequent MC updates will remove any additions you make to the default file.

I have tested this here, and it works as I think you want it to, as in, it opens that dialogue. Mine defaulted to opening in the MC program folder.

I've attached a copy of my own resource file in case you are interested. As well as the Ctrl+a you required (which does replace the existing "Select All" command), it has:
Ctrl+T to toggle the tree open/closed
Ctrl+Alt+D to open explorer at the folder of the selected file, and select that file in said folder.
Ctrl+Alt+R to start a seedless play doctor session (this one is global)
Thank you so much, I have tried many times to create the hotkey but I have not succeeded, the combination now works perfectly.

One question: is it normal that in the "Open Media File" button now appears "CTRL+A"?

Greetings.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Help adding a keyboard shortcut
« Reply #5 on: October 31, 2021, 10:45:19 am »

Yes, that's normal. If you check in those top menu items, you will see that all corresponding keyboard combos are detailed.
Pages: [1]   Go Up