Skip to content

[BUG] modifiers (shift, ctrl, cmd, etc.) don't work for useKey:true flag #1318

@sergeyteleshev

Description

@sergeyteleshev

Bug description
When using the flag useKey: true, modifiers like shift, ctrl, alt, etc, are no longer checked. For example, I use shortcut save (Ctrl+Shift+S). This shortcut handler fires if I simply press the "s" key (not considering modifiers)

Steps To Reproduce
Steps to reproduce the behavior:

  1. Create a save shortcut (Ctrl+Shift+S)
  2. pass to the hook useKey: true
  3. Press just the key "s" without modifiers

Current behavior: fires save shortcut handler
Expected behavior: nothing happens. Shortcut applies only to Ctrl+Shift+S.

Desktop (please complete the following information):

  • OS: macOS
  • Browser Chrome
  • Version latest (5.2.4)

Attached the PR with my version of the fix:
#1317

Metadata

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