naoki-mizuno30 downloadsCustomize keyboard shortcuts for navigating modal dialogs and suggestion lists.
An Obsidian plugin that allows you to customize keyboard shortcuts for navigating modal dialogs and suggestion lists.
Ctrl+n → Arrow DownCtrl+p → Arrow Upnot set → Uses Obsidian default (Enter) to confirm/accept in modalnot set → Uses Obsidian default (Escape) to close modalYou may observe some issues when you explicitly set the confirm/close
shortcuts to the Obsidian default keys (e.g., Enter for confirm,
and Escape for close) and set a target that makes the shortcut
effective in the editor (e.g., .app-container or .cm-editor).
In this case, the key is processed twice (once by the Obsidian app, and once
more due to this plugin sending the Enter key event), resulting in
two lines added from a single Enter key press.
In short, it is recommended to only set shortcuts that you would like to use and leave unused actions unset.
Navigate to Settings → Modal Keys Remapper to customize:
.suggestion-container and .modal-containerNotes:
The plugin listens for keyboard events when specific modal elements are present in the DOM. When you press a configured key combination, it dispatches the corresponding arrow key, enter key, or escape key event to navigate, confirm, or close in the modal.
If you would like to add more elements for the shortcut to be effective in, open the developer tool (Ctrl+Shift+i or Cmd+Shift+i) to find the class name, then append that in the Target CSS classes setting.
<vault>/.obsidian/plugins/obsidian-modal-keys/# Clone the repository
git clone https://github.com/naoki-mizuno/obsidian-modal-keys.git
# Install dependencies
npm install
# Start development build (watch mode)
npm run dev
# Production build
npm run build
For development, you can also place the repository folder directly in your vault's .obsidian/plugins/ folder and run npm run dev to automatically rebuild on changes.
This plugin is largely based on obsidian-command-palette-keys and the discussion at the Obsidian forum.
MIT License - see LICENSE for details.