SAS keyboard shortcuts let you edit programs, submit code, navigate tabs, inspect logs, and manage files without repeatedly switching to the mouse. The exact shortcut depends on whether you use SAS Studio, the traditional SAS Windowing Environment, SAS Enterprise Guide, or another SAS editor.
The tables below focus primarily on SAS Studio shortcuts for Windows and macOS. Browser shortcuts, operating-system settings, SAS Studio releases, and administrator customizations can affect individual key combinations. On a Mac, you may need to hold Fn when using F3, F9, F10, or F11, depending on the keyboard settings.
SAS Studio Keyboard Shortcuts for Windows and Mac
| SAS Studio action | Windows shortcut | Mac shortcut |
|---|---|---|
| Run the selected code, or run the complete program when no code is selected | F3 | Fn + F3, when function keys control hardware features |
| Reset the SAS session | F9 | Fn + F9, when required |
| Print the active SAS program | Ctrl + P | Command + P |
| Save or download the active program, log, or result when the command is available | Ctrl + S | Command + S |
| Zoom in | Ctrl + plus sign | Command + plus sign |
| Zoom out | Ctrl + minus sign | Command + minus sign |
| Reset browser zoom | Ctrl + 0 | Command + 0 |
| Maximize or restore the currently displayed SAS Studio tab | Alt + F11 | Fn + Shift + F11, when required |
| Open the context menu for a selected navigation item | Shift + F10 | Fn + Shift + F10, when required |
| Move focus to the Server Files and Folders area | Alt + 1 | Option + 1 |
| Move focus to the current secondary tab label | Alt + 2 | Option + 2 |
| Move focus to the current primary tab label | Alt + 3 | Option + 3 |
| Move focus to the Code tab body | Alt + 4 | Option + 4 |
| Move focus to the Log tab | Alt + 5 | Option + 5 |
Resetting a SAS session can clear temporary session state, including objects stored in the WORK library. Save required programs and permanent data before using the reset command.
SAS Code Editor Shortcuts for Editing and Submitting Programs
| Code editor action | Windows shortcut | Mac shortcut |
|---|---|---|
| Add or remove comment markers for the selected lines | Ctrl + / | Command + / |
| Display the SAS keyword autocomplete list | Ctrl + Space | Control + Space |
| Move between an autocomplete list and its Help panel | Tab or Shift + Tab | Tab or Shift + Tab |
| Select all code | Ctrl + A | Command + A |
| Copy selected code | Ctrl + C | Command + C |
| Cut selected code | Ctrl + X | Command + X |
| Paste code | Ctrl + V | Command + V |
| Undo the previous edit | Ctrl + Z | Command + Z |
| Redo an edit | Ctrl + Y | Command + Shift + Z |
| Find text in the active editor | Ctrl + F | Command + F |
| Change the case of selected text | Ctrl + Shift + U | Command + Shift + U |
| Create a rectangular or column selection with the mouse | Alt + drag | Option + drag |
SAS Comment Shortcut for One or More Lines
In the SAS Studio code editor, select one or more lines and press Ctrl + / on Windows or Command + / on Mac. SAS Studio adds comment markers to uncommented lines or removes them from lines that are already commented.
If the shortcut does not work, make sure focus is inside the code editor rather than the navigation pane, log, results area, or browser address bar.
SAS Autocomplete Shortcut and Keyword Help
Press Ctrl + Space to request SAS keyword suggestions. On macOS, this uses the Control key rather than the Command key. If macOS has assigned Control + Space to an input-source command, change that operating-system shortcut or choose the completion command from the SAS Studio interface.
SAS Cursor Navigation Shortcuts on Windows and Mac
| Cursor movement | Windows shortcut | Mac shortcut |
|---|---|---|
| Move one word to the left | Ctrl + Left Arrow | Option + Left Arrow |
| Move one word to the right | Ctrl + Right Arrow | Option + Right Arrow |
| Move to the beginning of the current line | Home | Command + Left Arrow |
| Move to the end of the current line | End | Command + Right Arrow |
| Move to the beginning of the program | Ctrl + Home | Command + Up Arrow |
| Move to the end of the program | Ctrl + End | Command + Down Arrow |
| Move one page up or down | Page Up or Page Down | Page Up or Page Down, sometimes with Fn |
| Select one character to the left or right | Shift + Left Arrow or Shift + Right Arrow | Shift + Left Arrow or Shift + Right Arrow |
| Extend the selection to the previous or next line | Shift + Up Arrow or Shift + Down Arrow | Shift + Up Arrow or Shift + Down Arrow |
| Extend the selection by one word | Ctrl + Shift + Left Arrow or Right Arrow | Option + Shift + Left Arrow or Right Arrow |
| Extend the selection to the beginning or end of the line | Shift + Home or Shift + End | Command + Shift + Left Arrow or Right Arrow |
SAS Code Deletion Shortcuts for Windows and Mac
| Deletion action | Windows shortcut | Mac shortcut |
|---|---|---|
| Delete the word to the left of the cursor | Ctrl + Backspace | Option + Delete |
| Delete the word to the right of the cursor | Ctrl + Delete | Option + Forward Delete |
| Delete the character to the left | Backspace | Delete |
| Delete the character to the right | Delete | Fn + Delete when the keyboard has no Forward Delete key |
Apple labels the backward-delete key as Delete. On compact Mac keyboards, Fn + Delete usually performs forward deletion. This difference explains why a SAS shortcut written for Windows may not map to a Mac key with the same printed label.
Windows-to-Mac Key Mapping for SAS Shortcuts
| Windows key or action | Typical Mac equivalent in SAS Studio | Important distinction |
|---|---|---|
| Ctrl for standard editing commands | Command | Copy, paste, save, find, undo, and similar shortcuts usually use Command on Mac. |
| Ctrl for editor-specific commands | Control or Command, depending on the command | SAS autocomplete uses Control + Space on Mac, while commenting uses Command + /. |
| Alt | Option | Used for pane navigation and alternative cursor actions. |
| Backspace | Delete | Deletes backward on both platforms despite the different key labels. |
| Delete | Forward Delete or Fn + Delete | Deletes the character in front of the cursor. |
| F3, F9, F10, or F11 | Fn plus the corresponding function key when required | The Fn key is unnecessary when macOS is configured to use F1–F12 as standard function keys. |
| Home and End | Command + Left Arrow or Right Arrow for line navigation | Fn + Left Arrow or Right Arrow may perform document or page navigation in some contexts. |
A Windows keyboard connected to a Mac still follows the macOS modifier mapping. The Windows logo key commonly acts as the Mac Command key, and Alt acts as Option. The physical key label does not change the shortcut expected by macOS.
SAS Studio Shortcuts Compared with Other SAS Interfaces
SAS products do not use one universal keyboard-shortcut list:
- SAS Studio: Runs in a web browser. Some key combinations can be intercepted by the browser or operating system.
- SAS Windowing Environment: Uses Display Manager windows and can assign commands through function keys and key definitions.
- SAS Enterprise Guide: Has its own program editor, project interface, and shortcut assignments.
- Visual Studio Code with SAS extensions: Combines editor shortcuts from VS Code with commands supplied by the installed extension.
Before relying on a shortcut in shared instructions, identify the SAS application, operating system, browser, and release. A shortcut documented for SAS Studio should not automatically be presented as a SAS Enterprise Guide or Display Manager shortcut.
Why a SAS Keyboard Shortcut May Not Work
- The wrong pane has focus: Click inside the Code editor before using an editing or submission shortcut.
- The browser captures the keys: Browser commands can override SAS Studio shortcuts, particularly combinations involving tabs, search, downloads, or function keys.
- The operating system reserves the shortcut: macOS and Windows accessibility, input-source, Mission Control, and hardware settings can claim certain combinations.
- Function keys control hardware: Hold Fn on many laptops, or change the system setting so F1–F12 behave as standard function keys.
- The SAS interface is different: SAS Studio, Enterprise Guide, Display Manager, and third-party editors do not always share the same mappings.
- The installed release uses another mapping: Check the keyboard-shortcut help supplied with the SAS product and release being used.
SAS Keyboard Shortcuts FAQs
What is the SAS shortcut for running code?
In SAS Studio, press F3 to run selected code. If no code is selected, SAS Studio runs the complete program. On a Mac keyboard that assigns hardware controls to the function keys, use Fn + F3.
What is the SAS shortcut for commenting code?
Select the required lines in the SAS Studio editor and press Ctrl + / on Windows or Command + / on Mac. The same shortcut removes the comment markers when the selected lines are already commented.
What is the Command key when using a Windows keyboard on a Mac?
The Windows logo key normally functions as the Command key when a Windows keyboard is connected to a Mac. The Alt key normally functions as Option.
Why does F3 not run SAS code on a Mac?
The Mac may be treating F3 as a hardware or Mission Control key. Try Fn + F3, or configure macOS to use F1–F12 as standard function keys. Also confirm that focus is in the SAS Studio code editor.
Are SAS Studio and SAS Enterprise Guide shortcuts the same?
No. Some standard editing shortcuts are shared, but application-specific commands can differ. Use the shortcut reference for the exact SAS application and release installed on your computer.
SAS Keyboard Shortcuts Editorial QA Checklist
- Verify that every application-specific shortcut is identified as SAS Studio, Display Manager, Enterprise Guide, or another named editor.
- Confirm that the SAS run-code shortcut explains the difference between selected code and the complete program.
- Check Mac function-key instructions on both standard Apple keyboards and keyboards that require Fn.
- Keep Command, Control, Option, Delete, and Forward Delete mappings distinct in the Windows-to-Mac table.
- Confirm that resetting a SAS session includes a warning about temporary WORK data and session state.
- Test shortcuts with focus in the Code editor and check whether the browser or operating system intercepts them.
- Review the shortcut list against the documentation for the SAS Studio release covered by the article.
TutorialKart.com