Skip to content

fix(hotkeys): restore Select Folder action and Alt+F/Esc shortcuts#22

Merged
oahsiao merged 1 commit into
mainfrom
fix/folder-picker-altf-esc-hotkeys
Jun 17, 2026
Merged

fix(hotkeys): restore Select Folder action and Alt+F/Esc shortcuts#22
oahsiao merged 1 commit into
mainfrom
fix/folder-picker-altf-esc-hotkeys

Conversation

@oahsiao

@oahsiao oahsiao commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Restores the Select Folder action and the Alt+F / Esc keyboard shortcuts, which had stopped working.

Root causes & fixes

  1. Duplicate _selectFolder method — a later _selectFolder(folderRow) (tree-row selection) shadowed the folder-picker _selectFolder(), so the button and Alt+F hit the wrong method and did nothing. Renamed the tree-row version to _selectFolderRow and updated its 6 call sites.
  2. Electron menu captured Alt+F — with autoHideMenuBar the default app menu still grabbed the Alt key / Alt+F mnemonic. Added Menu.setApplicationMenu(null) so all Alt shortcuts reach the renderer.
  3. Hotkeys blocked while typing — Alt+F (Select Folder) and Esc (Stop) sat behind the isTypingTarget early-return. Moved both before the guard so they fire even when the keyword/filter field has focus.

Files

  • src/main/main.js — remove default application menu
  • src/renderer/js/renderer.js — method rename + hotkey reordering

Testing

  • Click Select Folder → in-app picker opens.
  • Alt+F from anywhere (incl. keyword field) → picker opens.
  • Esc during a running search (incl. keyword field) → search stops.
  • Tree keyboard navigation (folder rows) still works.

Requires a full app restart to pick up the main.js change.

The Select Folder button and Alt+F shortcut stopped working due to a duplicate _selectFolder method and the default Electron menu swallowing Alt+F.

- Rename the tree-row folder selector to _selectFolderRow to resolve the method-name collision that shadowed the folder-picker _selectFolder (button + Alt+F now reach the picker).

- Remove the default Electron application menu (Menu.setApplicationMenu(null)) so the hidden menu bar no longer captures Alt / Alt+F mnemonics.

- Move Alt+F (Select Folder) and Esc (Stop) handling before the typing-target guard so both work while the keyword/filter field has focus.
@oahsiao oahsiao merged commit d485d2b into main Jun 17, 2026
2 checks passed
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