Codion applications are keyboard-first: every panel, control and navigation action is reachable without the mouse, and every shortcut is discoverable and configurable. The complete, always-current reference for a running application is available via its Help menu (Keyboard shortcuts).
1. ControlKeys
Each UI class declares its controls in a ControlKeys class — EntityTablePanel.ControlKeys, EntityEditPanel.ControlKeys, EntityPanel.ControlKeys — where each key identifies a control and carries its default keystroke. The javadoc of each ControlKeys class is the authoritative shortcut listing for that component.
Keystrokes are configurable at two levels:
Application-wide — modify a default keystroke before the panels are created, typically in main():
// Add a CTRL modifier to the DELETE key shortcut for table panels
EntityTablePanel.ControlKeys.DELETE.defaultKeystroke().update(keyStroke ->
keyStroke(keyStroke.getKeyCode(), MENU_SHORTCUT_MASK));
Per panel — via the panel configuration:
new EntityTablePanel(tableModel, config ->
config.keyStroke(EntityTablePanel.ControlKeys.REFRESH, keyStroke ->
keyStroke.set(KeyStroke.getKeyStroke(VK_F5, 0))));
2. Custom key bindings
For key bindings beyond the built-in controls, the KeyEvents builder associates keystrokes with actions on any component — see the KeyBinding tutorial for a complete example.
3. The essentials
A few defaults worth knowing from the start, since they shape how applications feel:
-
Navigation: CTRL-ALT-UP/DOWN between master and detail panels, CTRL-ALT-LEFT/RIGHT between siblings — focus follows.
-
Focus: CTRL-E edit panel, CTRL-T table, CTRL-I initial input field, CTRL-F table search field.
-
Table: INSERT adds, CTRL-INSERT edits the selected row, SHIFT-INSERT edits one value for the whole selection, DELETE deletes.
-
Transfer focus on enter: ENTER moves to the next input component in edit panels, so data entry never touches the mouse.
|
Note
|
CTRL above refers to the platform menu shortcut key — CTRL on Windows/Linux, ⌘ on macOS. |