KeyAcceleratorItem

ceramic.KeyAcceleratorItem (Enum)

Represents a component of a keyboard shortcut combination.

KeyAcceleratorItem is used to build keyboard shortcuts by combining modifier keys (Shift, Cmd/Ctrl) with regular keys. This allows for cross-platform keyboard shortcuts that adapt to the operating system (Cmd on macOS, Ctrl on Windows/Linux).

Example combinations:

  • Ctrl+S: [CMD_OR_CTRL, KEY(KeyCode.KEY_S)]
  • Shift+Tab: [SHIFT, KEY(KeyCode.TAB)]
  • Ctrl+Shift+Z: [CMD_OR_CTRL, SHIFT, KEY(KeyCode.KEY_Z)]

Constructors

SHIFT

SHIFT

Represents the Shift modifier key. Used for uppercase letters and secondary key functions.

CMD_OR_CTRL

CMD_OR_CTRL

Represents Command key on macOS or Control key on other platforms. Automatically adapts to the current operating system for consistent shortcuts.

SCAN

SCAN(scanCode: ceramic.ScanCode)

Parameters:

Name Type Description
scanCode ceramic.ScanCode The scan code of the key

Represents a regular key identified by its scan code. Scan codes are layout-independent (physical key position).

KEY

KEY(keyCode: ceramic.KeyCode)

Parameters:

Name Type Description
keyCode ceramic.KeyCode The key code of the key

Represents a regular key identified by its key code. Key codes are layout-dependent (varies with keyboard layout).