SAS Hotkey permanent binding - sas

I know F9 opens the definitions windows in SAS Enhanced Editor but the changes made here seem to last only for the current session.
Is there a way to configure SAS so that the hotkeys stay effective for any subsequent sessions ?

Check the 'Save settings on exit' option is selected in 'preferences' (Menu: Tools -> Options -> Preferences). This option should be on the 'General' tab. I can't be sure this will do the trick though but I expect so.
Go here to read more about it:- http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#customizing.htm

Typing 'keys' in the command box brings up current assignment of all hotkeys in SAS. You can edit these and save the keys. As you noted, you can only have one copy of SAS up and running to do this (or you have to do it on the version you opened first that locked the .profile).
You can also map the hotkeys to several commands.
For example, I have F8 mapped to do the following:
out;clear;log;clear;wpgm;submit;log;top;
That clears current output (if you still use ods listing), clears the current log, submits contents of program editor, and then positions cursor at top of log window for review.
Cheers,
john

Related

MFC "Hidden" or "Default" Function Key Accelerators?

I have a pretty normal MFC SDI application.
I recently started using things from the new MFC feature pack (eg CMFCToolbar), and after all these changes, I am seeing some unexplained behavior in keyboard shortcuts.
It seems some resource IDs have function key shortcuts (like F6), but I cannot find out how this works, or how to disable it.
For example, if I mouseover ID_ABC in a toolbar, I see a tooltip like:
ABC (F2)
Do ABC action
I don't see VK_F2 anywhere in the accelerator table, or anywhere at all for that matter. I also cannot find (F2) anywhere at all in the solution. This all seems very weird to me. Pressing F2 does indeed do ABC.
If I delete the entire accelerator table, that seems to "fix" the problem, but then of course I have no accelerators. As soon as I add any accelerator back, the problem re-appears.
Usually, when I run into these things, I seem to be on my own, and the cause of the problem is usually "far away", sort of like landing in some random function after a bad memory access, and saying, "why am I here"??
But if anyone knows anything about this, thanks!
Just look into the accelerator table in the resource file of your application. Yes, many standard commands do have accelerator keys assigned (eg Ctlr+S is mapped to the File Save command). You can delete the commands you do not want (individually, not the whole accelerator table). The application "remembering" the old accelerator table assignments (or not working with the new ones) may be due to saving these in the registry. Go there and delete the "Workspace" tree for your application, and then test anew.
Menu item labels must contain the shortcut as well, separated by a tab (eg File &Open\tCtlr+O). Status bar hints and tooltips are created by a string resource, with the same ID as the menu or toolbar item. You can create/edit these in the Menu Editor or the String Table Editor. The two items are separated by a newline character.

SAS EG -How to keep "Program" window open when error in log

I've just switched to SAS EG from PC-SAS. If I run code from the Program tab, and it creates an error, my view is automatically changed from the Program tab to the Log tab. I'd like to turn this off. Is there an option for this?
Go to menu Tools-> Options -> Results. Under managing results section, uncheck "Display SAS log when errors occur."
As a side note, under Tools->Options->SAS Programs->Editor Options you will find a familiar menu for customizing how the editor looks and works.

Visual Studio go to bookmark only inside current file

Is it possible to go to the next/prev bookmark only inside the current file? I'm using VS 2010 and I find it extremly annoying that it jumps always across all files when I want to navigate inside the current file only.
Yes. Go to "customize" (right click on the toolbox area, choose customize) ->commands->keyboard, choose edit.NextBookmarkInDocument and associate it with a shortcut.
In addition, you can add it as a button in the text editor toolbar. Go to to text editor toolbar, press the little mark on the bottom-right,and choose the appropriate button to add.
Set bookmarks to stay in one file in Visual Studio 2019
In the Search box at the very top menu, put in ‘customize’ and hit Enter’.
A complex box comes up, but I simply clicked on a button at the bottom labelled ‘Keyboard’, which is where keyboard shortcuts can be set up.
That brings up another huge box. In the left hand pane is Environment and under that is Keyboard. I guess that the way I went in is why this was expanded and already selected, so there must be other ways to get to the same place.
In a right hand pane is now a huge list of commands that can have shortcuts attached!
The ones to scroll to (enlarge the box or the scroll bar is a joke. A slight move scrolls dozens of lines!) are Edit.NextBookmarkInDocument and Edit.PreviousBookmarkInDocument. (similar commands without ‘inDocument on the end are what f2/ shift f2 do by default and jumps between files rather than staying in the same document.)
When you select a command you can then just click on the field labelled ‘Press shortcut keys’ and then press the keys you want to be the shortcut for that command.
I assigned Edit.NextBookmarkInDocument to f2, which then replaces the old f2 that jumps from file to file, and shift f2 for Edit.PreviousBookmarkInDocument. You have to press the ‘Assign’ button to make VS remember the change. After this, bookmark jumps stay in the same file. I guess you could choose any shortcut you fancy, and it does at least show you if that shortcut is assigned and what it is assigned to.
There are some features which I have not explored, like when I use f2 it shows it is assigned to ‘Rename’ but it seems to not effect that function at all when you reassign and just takes it away from the jump between files command version. Maybe someone would like to delve deeper, but what I did worked without any side effects and renames outside of VS still worked with f2 so I have no idea what it was going on about.

Lookup Combo that supports remote data - load data only after user wants to

I'm building a VCL c++ builder application. I would like to see if anyone knows of a component that can load data in the lookup upon drop down only after a user has typed a few letters to limit the rows queried? Preferably after pressing Tab, or Enter.
What I would like best is to get a behaviour similar to what Linux command line has, but that might be wishful thinking. The way it would work is to drop down the combo list after user presses tab only if there is multiple options available, and to fill in additional text till the point where characters are not the same anymore, then if user presses tab again, drop down list.
The next best would be if the drop down would only allow drop down if user has typed a few letters, then pressing a specific button opens the dataset with the parameter of the typed text so far, then drops down the combo.
Does a component like this exist?
You can check out TMS Software. I'm not sure if it has something exactly for you, but their components are quite flexible. And you can send a feature request to them - to consider for next update. If you are lucky they might add it to next release.

How to remove tab indent from several lines in IDLE?

If you want to indent several lines in Python IDLE you just mark the lines and hit Tab. But what if you want to remove the indent from several lines? Shift+Tab does not work for that in IDLE.
If you're using IDLE, you can use Ctrl+] to indent and Ctrl+[ to unindent.
If you're using IDLE, and the Norwegian keyboard makes Ctrl-[ a problem, you can change the key.
Go Options->Configure IDLE.
Click the Keys tab.
If necessary, click Save as New Custom Key Set.
With your custom key set, find "dedent-region" in the list.
Click Get New Keys for Selection.
etc
I tried putting in shift-Tab and that worked nicely.
Depends on your editor.
Have you tried Shift+Tab?
in pythonwin,
SHIFT + TAB works
For IDLE, select the lines, then open the "Format" menu. (Between "Edit" and "Run" if you're having trouble finding it.) This will also give you the keyboard shortcut, for me it turned out that dedent shortcut was "Ctrl+["
Shift-Tab
Ctrl-Tab
< key
depends on your editor.
In Jupyter Notebook,
SHIFT+ TAB(to move left) and TAB(to move right) movement is perfectly working.
By default, IDLE has it on Shift-Left Bracket. However, if you want, you can customise it to be Shift-Tab by clicking Options --> Configure IDLE --> Keys --> Use a Custom Key Set --> dedent-region --> Get New Keys for Selection
Then you can choose whatever combination you want. (Don't forget to click apply otherwise all the settings would not get affected.)