Skip to content

Conflicting keyboard shortcuts with text input #33

Open
@mathewparet

Description

I have trouble writing into text field when hotkeys are enabled!

I am trying to achieve something like a Gmail style of keyboard shortcuts. So this is my current mapping:

  1. To move the pointer up of down a list of items - j for next item and k for the previous item
  2. For other items I have shortcuts like s for suspending, a for activate, x for delete, etc.
  3. To focus on the search box - /
  4. To unfocus (blur) from search box - esc

The component with search box and its hotkey definitions are used withing another component which has a list of items and hotkeys actions on that list.

Now when I press /, as expected focus goes to the search box. But then when I try to type something in the search box that has the letter s, then it enters s in search but along with that s for suspend is also executed.

How can I make sure hotkeys s, a, and x doesn't run when the search box is in focus?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions