Author Topic: New! Need some direction in creating Keyboard Shortcuts  (Read 14851 times)

EagleBrewing

  • Junior Member
  • **
  • Posts: 28
    • View Profile
Good morning.
I am new to MC and love it.  There is just so much to it!
I want to start with something simple.
I would like to create a button or keyboard shortcut command to switch the view from normal folder/file/detail layout to show the thumbnails (and toggle back).
This would normally be going to View, changing the Explorer Panel View Mode, but requires 3-4 clicks or drop downs in the menus.
I love and use keyboard shortcuts for everything and would like to set this up.
Is there a tutorial(s) or previous posts, that would help one along in doing this?
It is hard to search the forum sometimes as each post might use different words to describe the issue.
I'll keep looking and thanks for checking my post.
Bob
Astoria, Oregon, USA

AlanJB

  • VIP Member
  • *****
  • Posts: 433
  • VERY old Programmer
    • View Profile
Re: New! Need some direction in creating Keyboard Shortcuts
« Reply #1 on: July 21, 2016, 17:38:45 »
Hi Bob and welcome to the world's best File Commander forum :)

There is a Custom Command 'MC.Explorer.SetViewMode' which takes a single parameter Mode that will change the Explorer Panel view mode.

But... there is no function to determine which view mode you are currently using (or at least none that I can find).  If that is, indeed, the case you would need to bind two hotkeys: one for set view mode to detail and another to set view mode to thumbnails.

On the other hand, if you really want a single key to toggle the view mode, I can think of a way to do that using MultiScript.  Let me know if you want to dip your toes into the warm but murky waters of scripting...

(Hopefully somebody else will jump in and say "I know a really easy way to do that").


Alan

EagleBrewing

  • Junior Member
  • **
  • Posts: 28
    • View Profile
Re: New! Need some direction in creating Keyboard Shortcuts
« Reply #2 on: July 22, 2016, 03:53:19 »
Thanks for the reply.
I have dabbled in some script before.  My career many centuries before was computer programming.
Like I said, a long time ago.  Mostly mainframe stuff, but understand programming and syntax.
If I could have a few samples to get the general idea, I can usually figure it out.
If you could give me some simple script to look at, I'll try to go from there.
I will look at the Help on scripting.
This is not critical, but you know how it is.  Extra mouse clicks sometimes are a irritating!
Thanks again.
Bob

AlanJB

  • VIP Member
  • *****
  • Posts: 433
  • VERY old Programmer
    • View Profile
Re: New! Need some direction in creating Keyboard Shortcuts
« Reply #3 on: July 22, 2016, 10:06:58 »
Glad to hear you're game for a challenge!

What I found most useful was to read the entire Script sub-forum; every post.  Lots of good tips and advice in there.

Also get your head firmly around the difference between Custom Commands and MultiScript.  It will save a lot of pain!

  Custom Commands are simple one-liners - ALWAYS.
  MultiScript allows flow control & tests, loops, etc., including the ability to call Custom Commands. Powerful stuff.

The MultiScript debugger is a great little environment for developing and testing.

Lastly, read ALL the help on Custom Commands and MultiScript.  Invaluable stuff.

Do some experimenting & if you get really stuck, there is always someone here to help.

Alan

EagleBrewing

  • Junior Member
  • **
  • Posts: 28
    • View Profile
Re: New! Need some direction in creating Keyboard Shortcuts
« Reply #4 on: July 22, 2016, 16:13:06 »
Thanks for the tips and direction.
Bob

EagleBrewing

  • Junior Member
  • **
  • Posts: 28
    • View Profile
Re: New! Need some direction in creating Keyboard Shortcuts
« Reply #5 on: September 09, 2016, 21:20:20 »
Just wanted to add to this post.
After learning Buttons in MC, I found that you can set a button to view Detail, Thumbnail, or any of the other options. 
That was my original question, make a shortcut to toggle view/detail/thumbnail.
There are a ton of other things you can do with buttons. 
Split screen or variations of it, and others.
Glad I took the time to understand buttons.
If you have not tried them, give a go!
What a program ...
Bob