Talljack / vue3-hotKey

vue3 hooks of keyboard input.

Home Page:https://vue3-hot-key-demo.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug with CMD

paulocastellano opened this issue · comments

Hello,

I got a bug in this sequence:

  • CMD + P (open modal) ✅
  • Esc close modal ✅
  • Only CMD, OPEN modal ❌ (BUG)
useHotkey([
            {
                keys: ["Meta", "p"],
                preventDefault: true,
                handler: (keys) => {
                    console.log("111");
                    this.openGlobalSearch();
                },
            },
            {
                keys: ["Control", "p"],
                preventDefault: true,
                handler: () => {
                    console.log("123");
                    this.openGlobalSearch();
                },
            },
        ]);

I will check it

I use mac and I did not reproduce this problem, can you use sandbox to reproduce it?