1
0
Fork 0
Fixes Paseo's shortcuts in different keymaps
  • TypeScript 100%
Find a file
2026-09-23 08:51:34 +00:00
client feat: basics 2026-09-23 08:51:34 +00:00
.dprint.json feat: basics 2026-09-23 08:51:34 +00:00
.gitignore feat: basics 2026-09-23 08:51:34 +00:00
index.client.tsx feat: basics 2026-09-23 08:51:34 +00:00
package.json feat: basics 2026-09-23 08:51:34 +00:00
paseo-plugin.json feat: basics 2026-09-23 08:51:34 +00:00
README.md feat: basics 2026-09-23 08:51:34 +00:00
tsconfig.json feat: basics 2026-09-23 08:51:34 +00:00

Paseo Localized Shortcuts

A Paseo plugin that makes the built-in keyboard shortcuts work in the browser while a non-Latin keyboard layout (Cyrillic, Greek, Hebrew, Arabic, ...) is active.

The problem

Paseo resolves a shortcut by the character a key produces (KeyboardEvent.key) and only falls back to the physical key (KeyboardEvent.code) for Alt bindings and Space/Enter. On a non-Latin layout the produced character is never the Latin letter a binding was authored with, so Ctrl+S, Cmd+K, Ctrl+P, and every other letter or punctuation shortcut silently stops working.

What the plugin does

It listens for keydown in the browser and, when a shortcut modifier is held and the produced character belongs to a non-Latin script, re-dispatches the event with the Latin key for the same physical key. Paseo's own shortcut engine then matches and routes it as usual. No action is reimplemented.

Scope is intentionally narrow:

  • Only while Ctrl, Cmd, or Alt is held, so plain typing and the terminal are never touched.
  • Only for non-Latin scripts, so Dvorak, AZERTY, and accented Latin layouts keep their logical-character matching.
  • The synthetic event is dispatched on window, so element-level handlers (xterm, editors, React inputs) do not see it. Focus scope still resolves from document.activeElement.
  • Shortcut recording and overlays stop propagation before this listener runs, so rebinding is unaffected.

Not covered: shortcuts that use only Shift (for example Shift+?), and the embedded browser pane in the Electron desktop app (its keys are filtered in the main process before they reach the app).

Install

The plugin is installed from Git:

paseo plugin install git:https://git.kosyrev.name/zoo/paseo-localized-shortcuts.git
paseo plugin ls

Update later:

paseo plugin update paseo-localized-shortcuts

Plugins are trusted, unsandboxed code. Read the source before installing.

Usage

The fix is active as soon as the plugin loads. A Localized Shortcuts item appears in the sidebar with an on/off switch and a short explanation.

Development

npm install
npm run typecheck
npm run format
paseo plugin reload paseo-localized-shortcuts
paseo plugin logs paseo-localized-shortcuts

Paseo compiles the TypeScript itself. The development dependencies exist only for local typechecking. Formatting uses dprint with the config in .dprint.json; dprint must be on PATH.