Skip to content

Hardcoded keybinds in onKeyDown bypass window.registerShortcut #10

Description

@carochacs

Problem

screen.js's onKeyDown handler (around line 2122) hardcodes keyboard shortcuts (Space, Delete, Backspace, Escape, G, F, K) directly as a document-level key listener, rather than registering them through the core-provided window.registerShortcut() API.

Core's shortcut system (documented in slopsmith's CLAUDE.md under "Keyboard Shortcuts") exists specifically so that:

  • All shortcuts appear in the global ? help panel
  • Shortcuts can be scoped (plugin-{id}) and conditionally active
  • Users have one place to discover every available keybind across the whole app

Because the editor's shortcuts bypass this system entirely, they're invisible to users unless they read the source — despite the Arrangement Editor being arguably the most shortcut-dense screen in the entire plugin ecosystem.

Ask

Migrate the hardcoded key handling in onKeyDown to window.registerShortcut() calls, scoped to plugin-editor (or player/global as appropriate per key), so these shortcuts surface in the ? help panel like every other plugin's shortcuts are expected to.


Migrated from Maestro-Ltd/slopsmith-plugin-editor#21.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions