Put Your PAWs to Work: Shortcuts to Workspace Proficiency

Using shortcut keys to perform your coding activities can significantly boost productivity. Switching from keyboard to mouse and back not only disrupts your flow or rhythm but breaks your concentration. Even a split second glance away from the screen can cause you to lose your place, slow you down and introduce errors.

The table below defines the various shortcut keys and mouse gestures. Some additional video clips have been included to try and better explain some of the less common shortcuts and mouse gestures which may be tricky to understand at first.

Brackets and Braces

These are probably not familiar navigation keys and examples may better explain their usage. These shortcuts work on paired brackets, braces and quotes i.e. start to end of function, start to end of a set in MDX or start to end of a string value.

Navigating to corresponding bracket or brace

Using Alt + Right arrow when the cursor is at the opening bracket will take you to the corresponding closing bracket. In the clip below I have the cursor at the opening bracket then use Alt + Right arrow to navigate to the closing bracket and then Alt + Left arrow to go back to the opening bracket.

 

Selection between brackets and braces

Similarly, using Alt + Shift + right arrow allows me to select from the opening bracket to the corresponding closing bracket. The same concept can be applied to work from the closing bracket back to the opening bracket.

 

Navigation differences between brackets and words

Typically Ctrl + Right arrow or Ctrl + Left arrow would be used to move along a line of code quicker than just Right arrow or Left arrow by itself.

The following clip shows the difference between the two where using the Alt + arrow combination is faster allowing you to move from one string to another or from the beginning of a string to the end or from the end to the beginning.

 

Note: the onscreen tool seems to change the keys being pressed when typing as a security measure. Please follow the navigation keys.

 

Practical example using bracket and brace selection

This example shows how to quickly take some legacy code where the whole function was coded on one line running off the screen and quickly split it across multiple lines for readability. We can use the brackets and braces navigation to skip over parameters and then enter a line break.

I find it quickest to go to the next parameter then come back one step to enter the line break.

 

Practical example editing MDX via the MDX editor

You have probably wondered where the braces come into play. Within MDX we not only have braces but round brackets, square brackets, quotes etc. Our shortcuts using Alt + arrows work nicely here allowing us to jump to opening or closing brackets or selecting everything in between using the Shift key when navigating.

 

In the above clip, you can see that we can navigate from opening square bracket to closing or opening brace to closing i.e. on the columns set. These shortcuts have a wide application in formatting code, confirming that the closing bracket is where it should be etc.

 

Column selection and Multi selection

It is possible to do column selection like you can in SQL server or Notepad++,  where you want to drag a cursor line down in front of the column names for example then tab them in. This also applies in many other IDEs. We can do the same in PAW where we may want to align our parameters passed to a process.

In the example below I will show how using Alt + dragging the mouse cursor down across lines will place a cursor at the same position in each line allowing you the then use space or tabs to indent the code.

Similarly I will also show you how you can use Ctrl + left click to select multiple lines and place a cursor to allow you to work across non-contiguous lines.

 

Unfortunately the code completion prompt makes it a bit tricky to see exactly what is going on but you should get the gist of the exercise.

Keep in mind that my example was very basic adding spaces but you could overtype, add new text etc. and update across multiple lines concurrently.

 

Mouse gestures

The following clip shows some gestures, some of which are probably quite familiar like Ctrl + Mousewheel Down/Up to zoom in or out.

It also shows a single click to place the cursor at a point, a double-click to select the word and a triple-click to select the whole line.

A really useful gesture you may not know is using Shift + Mousewheel Down/Up to scroll the window horizontally. This is especially useful when the code runs to the right and off the screen and wrapping is not enabled.

 

The other thing to note about these gestures is that they are common amongst most software and zooming will work in Teams when someone has shared content that is small, working in Word where you need to select the whole line or paragraph etc.

 

Board and Widget Specifications
Board Specifications

You have probably come across one or two blogs of mine referring to working with the PAW book’s board specification. This may be because it is quicker to copy the board specification in a Dev environment, create a blank book in Production and then past the board specification in and update to perform a quick migration or deployment.

Similarly you could select parts of a book e.g. one or more tabs and add them in to an existing book. See the article on Copying a tab from one PAW book to another.

To open the board specification may differ from keyboard to keyboard and browser to browser. I am using MS Edge and a QWERY, US keyboard layout and use the following: Ctrl + / + q

Essentially I enter edit mode then hold Ctrl then press / then, whilst holding both Ctrl + / I press q

You may have to try different combinations e.g. Ctrl + q then / to see what works for you. AZERTY keyboards can try Ctrl + q + :

 

You will notice that as I scroll, I can see the code behind the book and may be able to confirm certain things or copy and paste to a new book or text editor etc.

 

Widget Specifications and Serviceability

Widget serviceability does not work on all widgets but gives some information on time to render/refresh and you can view the specification behind the widget. This is likely an internal function that IBM developers use whilst testing and as such I have no further information on this.

Ensure that you are in edit mode, then select the widget and press Ctrl + . to open the Serviceability pane. In Chrome, you may need to use Ctrl + Shift + .

 

Summary

With the shortcut table and the video clips provided, I hope you are ready to transform the way you work in Planning Analytics Workspace!

By incorporating these shortcuts and mouse gestures into your daily routine you should reduce your reliance on the mouse, boost your navigation and editing speed.

Being able to navigate and edit faster leaves you with more time to structure and format your code for better readability. Whether it be to split lines and / or align parameters, refining MDX or rules, the shortcuts should have you working smarter in no time.

I hope this article has excited and motivated you to go and try them out and employ them in your day-to-day activities.

Thanks for reading and please leave any comments and feedback as there are likely shortcuts not mentioned or key combinations that do not work in your browser and keyboard and you have found the correct combination.

Special thanks to Wim Gielis  and Philip Bichard for their review and feedback.

By George Tonkin, Business Partner at MCi.

 

Further Reading