A shortcut key from the app tree to go into viewing the source code?

addin
Tags: #<Tag:0x00007f46dc4de138>

#1

Why yes, I do believe that is possible!! :slight_smile:

Continuing on the topic of addins, I was asked today if it is possible to make a shortcut key to go straight from the application tree of the IDE into viewing the source code.

This is something that I was personally missing from the very beginning and struggled to retrain that keyboard muscle memory so I made an addin. This feature is included in the MainToolbarExtras addin feature list as:

Edit ‣ Application Source with the shotcut key of Alt-s

How do I use it?

Once you install the addin, it will place a new menu item in the Edit menu of the IDE

Notice that it has the shortcut of Alt+S ?

So, when you are in the app tree and use the keyboard combination of Alt+S you will enter the source code of the currently selected procedure.

How does it work

The “hacky” part about this solution is the way it works.
Behind the scenes, when you press Alt+S, the addin will do this:

Thread.Sleep(100);
KeyboardSimulator.KeyDown(Keys.Shift);
KeyboardSimulator.KeyPress(Keys.F10);
KeyboardSimulator.KeyUp(Keys.Shift);
KeyboardSimulator.KeyPress(Keys.S);

The Thread.Sleep is ugly but seems to help with timing, the rest just simulates right clicking on the procedure and selected Source from the context menu :slight_smile:

Go… get it!

MainToolbarExtras

  • Automatically refresh the startpage after a solution is loaded.
  • Automatically re-open the StartPage when the solution is closed.
  • Automatically re-open the StartPage when an APP is closed.
  • Edit ‣ Application Source with the shotcut key of Alt+S
  • Set the size of the main toolbar and icons!
  • Optionally set the size for ALL accessible toolbars in the IDE!
  • Toolbar button - Run startup project Non-Elevated
  • Toolbar button - Run startUp project in the debugger
  • Expand/Collapse all code folds. See Edit ‣ Folding
  • Editor Font Size - Increase/Decrease/Reset (Reset to the font size found at IDE startup). See View ‣ Editor Font Size.
  • Toolbar buttons for common edit actions on the Embeditor/Embed Editor toolbar (Cut/Copy/Paste/Delete|Undo/Redo)

https://clarionaddins.com/addins/MainToolbarExtras.html


Awesome addin things for Clarionlive webinar#401