Elyra
Elyra The coding agent e The native code editor Elyra Grove Native local development environment Askr The real server for Laravel & PHP Elyra Framework Rust + Svelte 5 framework for desktop apps Elyra Conductor Local project conductor Elyra SQL Server MySQL-compatible SQL server in Rust Elyra SQL Client Native desktop SQL workbench Elyra SQL Anywhere Replication-ready SQL engine
Release notes
Changelog
Elyra
Global shortcuts

Global shortcuts

Feature-gated behind shortcuts. Register OS-level keyboard shortcuts that fire even when the app isn't focused.

elyra = { version = "0.3", features = ["shortcuts"] }
use elyra::App;

App::new()
    .title("MyApp")
    .global_shortcut("CmdOrCtrl+Shift+P")
    .global_shortcut("CmdOrCtrl+Alt+K")
    .run()

When a shortcut fires, the shell emits the elyra:shortcut event carrying the accelerator string; subscribe from the frontend:

import { onShortcut } from "@elyra/runtime";

const off = onShortcut((accelerator) => {
  if (accelerator === "CmdOrCtrl+Shift+P") openCommandPalette();
});

Accelerator syntax

Modifiers joined with +, then a key:

  • Modifiers: CmdOrCtrl / CommandOrControl, Cmd/Super, Ctrl/Control, Alt/Option, Shift.
  • Keys: letters (P), digits (1), function keys (F5), and named keys (Space, Enter, ArrowUp, …).

Registration failures (an invalid or already-taken accelerator) are logged and skipped; the rest still register.

Related