Skip to content

Add Left/Right arrow keyboard shortcuts to switch models#651

Open
henrikvilhelmberglund wants to merge 1 commit into
sdatkinson:mainfrom
henrikvilhelmberglund:feat-keyboard-nav
Open

Add Left/Right arrow keyboard shortcuts to switch models#651
henrikvilhelmberglund wants to merge 1 commit into
sdatkinson:mainfrom
henrikvilhelmberglund:feat-keyboard-nav

Conversation

@henrikvilhelmberglund

Copy link
Copy Markdown

This PR adds left and right arrow keyboard shortcuts for changing the current model in the model list. You click in the VST window to give focus to the VST, then left or right arrow to change the model, the model loading wraps end to start like the UI arrows. There are no other shortcuts for loading/clearing and such, I was only interested in changing models quickly without reaching for the mouse.

The code was written using Claude.

Description

(by Claude)
Exposes prev/next file navigation on NAMFileBrowserControl as public methods and installs a plugin-level key handler that maps kVK_LEFT and kVK_RIGHT (no modifiers) to the model browser's prev/next actions. Requires the plugin window to have keyboard focus. Text entries and other controls that consume the key still take precedence.

PR Checklist

  • Did you format your code using format.bash?
  • Does the VST3 plugin pass all of the unit tests in the VST3PluginTestHost? (Download it as part of the VST3 SDK here.)
    • Windows
    • macOS
  • Does your PR add, remove, or rename any plugin parameters? If yes...
    • Have you ensured that the plug-in unserializes correctly?
    • Have you ensured that older versions of the plug-in load correctly? (See Unserialization.cpp.)
  • Does your PR add or remove any graphical assets? If yes, are they defined in config.h and added in the two required locations in main.rc?

Exposes prev/next file navigation on NAMFileBrowserControl as public
methods and installs a plugin-level key handler that maps kVK_LEFT
and kVK_RIGHT (no modifiers) to the model browser's prev/next actions.
Requires the plugin window to have keyboard focus. Text entries and
other controls that consume the key still take precedence.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant