Skip to content

Listening to keyup instead of keydown for hotkeys & closing popup on releasing scan modifer key #1882

@danpetruk

Description

@danpetruk

Problem
Popup doesn't auto close when I stop pressing Shift (scan modifer key), which might be ok to someone, but is inconvenient for me.
I tried to change "configure keyboard shortcuts" settings and add Shift as close there, but this causes the popup to open and close back and forth.

Proposed solution
Change in this line in hotkey-handler.js keydown to keyup (and rename triggered function accordingly)
this._eventListeners.addEventListener(document, 'keydown', this._onKeyDown.bind(this), false);

I tried it locally and it works wonderfully and seem not to break anything.

Question
Would it be ok to submit pull request with such change?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementThe issue or PR is a new feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions