Skip to content

fix(files): open file actions menu with hotkey on non-Latin layouts - #66112

Open
lazerg wants to merge 2 commits into
nextcloud:masterfrom
lazerg:fix/issue-65056-files-actions-hotkey
Open

lazerg wants to merge 2 commits into
nextcloud:masterfrom
lazerg:fix/issue-65056-files-actions-hotkey

Conversation

@lazerg

@lazerg lazerg commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Summary

The a hotkey for the file actions menu never fired on non-Latin layouts, because the handler re-checked event.key === 'a' after useHotKey had already matched the physical key. Now it only checks that the key is not Escape.

AI (if applicable)

  • The content of this PR was partly or fully generated using AI (Claude, claude-opus-5-5)

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: lazerg <lazerg2@gmail.com>
@lazerg
lazerg requested review from a team and skjnldsv as code owners October 31, 2026 08:08
@lazerg
lazerg requested review from kristian-zendato and susnux and removed request for a team October 31, 2026 08:08

// a open the action menu
if (event.key === 'a' && !this.openedMenu) {
if (event.key !== 'Escape' && !this.openedMenu) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, any keys will open the actions menu ? 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, onKeyDown is only called by the two useHotKey bindings (Escape and a), so anything that isn't Escape here is the a key. On a Russian layout event.key is "ф", which is why the old === 'a' check never passed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the comment above it then ? :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the comment, thanks!

Signed-off-by: lazerg <lazerg2@gmail.com>

This branch has not been deployed

No deployments
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.

Files: file actions hotkey "A" does not work on non-Latin keyboard layouts

2 participants