Wednesday, April 18, 2012

SAS and Keyboard Shortcuts

Base SAS has an easy way to add keyboard shortcuts that not only do X typical keyboard shortcut task, but also Y SAS program task (e.g., execute a macro). This can be a bit tricky to get to work right, but I've done it with CheckLog, PrintContents, OpenTable, and other interactive macros. However, I can't seem to figure out how to do some of these same things in Enterprise Guide.

Sure, it's easier in Enterprise Guide to open a table that's been run, but what about that library with 10,000 tables where I want to open only 1? It's like searching for a needle in a haystack, not to mention the load time just to see the tables in the library (very slow at 10k tables). It's so much easier to use OpenTable, and it's even easier to use OpenTable via keyboard shortcut. I have another keyboard command to open the properties of the table (a window that is quite severely limited in SAS EG, so perhaps that wouldn't be quite as useful anyway).

And the windowing commands seem to be gone, too. I can't edit a keyboard shortcut to jump from the program to the log: In Base SAS, I use CTRL + L for the log, CTRL + J for the program ("J" only because it's easy to reach and on the same keyboard line as L), and CTRL + K for executing the CheckLog macro ("K" for checK, I guess--again, it's on the same keyboard line as J and L). Just to note: I also have the CAPS key remapped to CTRL, so that's even easier to reach for my lazy efficient hands.

If anyone has experience with doing these things in Enterprise Guide, I'd love to hear feedback on how you get things like this to work - or if you just gave up and went with the new flow. My searches online have been fruitless up to this point, so I wanted to have this post available, at least for a point of contact in case someone else is wondering about the same things I am.


  1. I don't know how to do this, so I forwarded a link to your blog post to Chris Hemedinger. If it can be done in Enterprise Guide, he knows how it is done. You might also consider following him on Twitter - @cjdinger. He's a genius. :-)

    I know another person who is very smart and keeps a log of her thoughts on her blog - Angela Hall. Your blog is great. Keep it up.

  2. Hey Chris,

    EG allows keyboard mapping for program editor commands (editor macros and abbreviations), which you can set from Program->Editor Keys.

    But while many keyboard shortcuts exist for operations from EG, you cannot customize most of them. For a list of all predefined shortcuts, look in the Help within the application. Check the index for "keyboard shortcuts".

    For a greater ability to customize, you might try a 3rd party hotkey application. AutoHotKey looks interesting, though I haven't tried it.


Note: Only a member of this blog may post a comment.