Keyboard shortcuts

From emergent
(Redirected from Keyboard Shortcuts)
Jump to: navigation, search

See also this handy Reference card.

Using the keyboard to navigate and operate the software can greatly improve your productivity, especially in the context of programming with Programs.

There are a small number of keys that allow you to do a lot of work, including the Emacs navigation keys which allow you to navigate in the same way as the arrow keys but without having to take your hands off the home position of the keyboard:

NOTE: All keyboard shortcuts are shown with the uppercase letters for clarity and by convention (and to map directly to what is shown on the keyboard), but this does NOT imply adding a Shift key -- that would be explicitly noted where necessary.

  • Emacs Navigation Keys
    • Ctrl+F -- forward (right arrow)
    • Ctrl+B -- backward (left arrow)
    • Ctrl+P -- previous line (up arrow)
    • Ctrl+N -- next line (down arrow)
    • Ctrl+U -- page up
    • Ctrl+V -- page down (v = arrow pointing down) (note: only avail on Mac, as it otherwise conflicts with Paste (which is Cmd+V on Mac))
    • Ctrl+A -- start of line (home)
    • Ctrl+E-- end of line (end)
  • Emacs Copy/Paste Keys (work in most contexts, including edit fields, tree browser etc)
    • Ctrl+Space -- start a new selection region -- subsequent movement will extend the selection
    • Ctrl+G -- cancel existing selection -- deselect all
    • Ctrl+W -- Cut (wipe) -- equivalent to Ctrl/Cmd+X
    • Alt+W -- Copy -- equivalent to Ctrl/Cmd+C
    • Ctrl+Y -- Paste -- equivalent to Ctrl/Cmd+V
  • Tree Browser/Item Selector Navigation
    • Ctrl+I -- insert a new item at the current cursor location (at the end if applied on a group object)
    • Ctrl+O -- inserts a new item after the current cursor location (also at the end if applied on a group object)
    • Ctrl+D or Delete -- delete selected item
    • Ctrl+M -- duplicate (make/mirror) selected item
    • Tab -- move to the next relevant gui field
    • Shift+Tab -- move back to previous gui field
    • + (plus key) or right arrow/Ctrl+F -- open the current tree node
    • - (minus key) or left arrow/Ctrl+B -- close the current tree node
    • any letter -- moves to next item in tree that starts with that letter
  • Window Panels (moving between left browser, middle edit panel, and right viewer panel)
    • Ctrl+J or Alt+J -- move focus to the next panel to the left
    • Ctrl+L or Alt+J -- move focus to the next panel to the right
    • Ctrl+Tab -- select next tab in panel with current focus
    • Ctrl+Shift+Tab -- select previous tab in panel with current focus
  • Edit Dialogs
    • Ctrl+Return -- Apply any changes to the edit (in Program editor it also returns to the program code listing)
    • Esc -- Revert any changes (also returns to program code in program editor)
    • Space -- to activate a button (e.g., to open up a selector for an item)
    • Ctrl+L -- lookup information (mainly in a program expression field -- see Program for more info)
  • Data Tables
    • Ctrl+Space -- start editing a cell -- starts out with cell contents selected -- if you want to preserve contents, use arrow keys or Ctrl+A or Ctrl+E to deselect and move to start/end, and start
    • Ctrl+S -- start a new selection -- instead of the usual Ctrl+Space because that is taken by the built-in function editing.
    • Ctrl+T -- toggle keyboard focus between the main data table and any matrix cell editor that might exist
    • Ctrl+M/I/D -- duplicate, insert, delete rows, just as in the tree browser
  • Text Edits
    • Ctrl+S -- find text
  • Css Console
    • Ctrl+L -- clear all
  • Plugin Editor
    • Ctrl+O -- move focus to other edit panel
    • Ctrl+M -- make (compile) the plugin

Thus, you can do Ctrl+N and Ctrl+P in the left browser panel to navigate up and down the tree, using Ctrl+F (or +) to open up relevant nodes, and Ctrl+I to insert new items, and then Tab over to the edit dialog in the middle edit panel (use Ctrl+F or Ctrl+B to move through the tabs at any level).

When programming, you can use Ctrl+N or Ctrl+P to move through the code, and then Tab up to the edit dialog to modify the code (use Space to activate selectors), and use Ctrl+L to lookup items in an expression (and you can use Ctrl+N, Ctrl+P, Ctrl+V, Ctrl+U to move around the selection panel).

The remaining sections below more fully document the full set of keyboard shortcuts.

Global/Project Shortcuts

Global/Project shortcuts Mapping Note
Ctrl+S Save Project Global Works from anywhere
Alt+F Find All Find All from currently selected node in tree browser
F3 Find again Find dialog initiated by Alt+F or otherwise
ESC Close dialog for spawned windows and dialogs and switches between Interact and Camera view when the network viewer is active Child windows, network viewer
Home Switches to home view Network viewer
TAB Iterates through parents and then their children in most views (excepting the network viewer)
Ctrl+I Insert object In any tree browser (e.g., left browser, program editor)
Ctrl+P Pin/Unpin tab Only with keyboard focus
Alt+I Open the File menu Can't use the standard Alt+F for File, because that's used for Find, since Ctrl+F is already taken for "Forward".
Alt+I+N New project Works from anywhere
Alt+I+O Open project Works from anywhere
Alt+I+P (broken) Print
Alt+I+S Save project
Alt+I+A Save project as
Alt+I+L Save all projects
Alt+I+O Options
Alt+E+P Paste
F3, Alt+E+N Find next
F5, Alt+V+R Refresh
Alt+V+S Save view
Alt+S+A Show all
Alt+H+H Help
Alt+H+A About
Alt+A or Ctrl+Return Apply Works in edit dialogs - look for the Apply
Alt+R or Esc Revert Works in edit dialogs - look for the Revert

Text Field Shortcuts

Text Field Shortcuts Mapping Note
---------------- Qt shortcuts ----------------------------------
Backspace Deletes the character to the left of the cursor
Delete Deletes the character to the right of the cursor
Ctrl+C, Ctrl+Insert Copy the selected text to the clipboard
Shift+Insert Pastes the clipboard text into text edit
Left/right arrow Moves the cursor one character to the left/right
Ctrl+Left/right arrow Moves the cursor one word to the left/right
Up/down arrow Moves the cursor one line up/down
Ctrl+up/down arrow Moves the cursor one word up/down
PageUp/PageDown Moves the cursor one page up/down
Home/End Moves cursor to start/end of line
Ctrl+Home/End Moves cursor to start/end of document
Ctrl+X Cut to clipboard Currently selected text
Ctrl+C Copy to clipboard Currently selected text
Ctrl+V Paste to current editable region Cursor position in any editable region
Shift+D (currently broken?) Delete Delete something (not sure what)
------------------------ Emacs/Readline shortcuts ----------------------------------
Ctrl+K Cut to clipboard all text from current cursor position to the end of the line Cursor position in any editable region
Ctrl+Y Paste to current editable region Cursor position in any editable region
Ctrl+L Choose member Any field that allows you to choose a member. Does completion on partially typed words when available
Ctrl+backspace Delete word
Ctrl+D Delete letter forward Doesn't properly copy that letter to the clipboard and has no delete letter backward corollary
Ctrl+F Forward letter
Ctrl+B Backward letter
Ctrl+N Next line For multi-line text regions
Ctrl+P Previous line For multi-line text regions
Ctrl+A Beginning of line
Ctrl+E End of line
Ctrl+U Select all text (only for single-line edits)

Tree Browser Shortcuts

Tree Browser Shortcuts Mapping Note
---------------------------------- Qt shortcuts ----------------------------------
Ctrl+I This is very useful -- inserts a new item below the current cursor position, allowing you to select the type of item -- you can use this to construct an entire project at the keyboard
UpArrow, Ctrl+P Moves the cursor to the item in the same column on the previous row. If the parent of the current item has no more rows to navigate to, the cursor moves to the relevant item in the last row of the sibling that precedes the parent.
DownArrow, Ctrl+N Moves the cursor to the item in the same column on the next row. If the parent of the current item has no more rows to navigate to, the cursor moves to the relevant item in the first row of the sibling that follows the parent.
LeftArrow, Minus, Ctrl+B Hides the children of the current item (if present) by collapsing a branch.
RightArrow, Plus, Ctrl+N Reveals the children of the current item (if present) by expanding a branch.
Asterisk Expands all children of the current item (if present).
PageUp, Ctrl+U Moves the cursor up one page.
PageDown, Ctrl+N Moves the cursor down one page.
Home Moves the cursor to an item in the same column of the first row of the first top-level item in the model.
End Moves the cursor to an item in the same column of the last row of the last top-level item in the model.
F2 In editable models, this opens the current item for editing. The Escape key can be used to cancel the editing process and revert any changes to the data displayed.

Suggested Shortcuts

Suggested shortcuts Mapping Note
Shift+Tab, Shift+RightArrow Move a tab to the right
Ctrl+Shift+Tab, Shift+LeftArrow Move a tab to the left
Ctrl+F Find Can't be Ctrl+F because that is preempted by emacs nav
Ctrl+spacebar Start selection Not sure if this is hard to implement, but its an extremely useful emacs shortcut when used in conjunction with readline shortcuts that allow you to move the cursor position and then cut/copy/paste text. This is the key thing that allows you to stop using the mouse in emacs.
Ctrl+Shift+S Save Project As
Ctrl+O Open project
Ctrl+N New project
Ctrl+~ Cycle through active emergent windows This is an OSX keyboard shortcut, and i'm not sure its possible to implement, although it seems likely
Alt+B Backward word Readline
Alt+F Forward word Readline
Ctrl+U Delete to beginning of line and copy to clipboard (readline) Currently mapped to a larger edit dialog