Skip to content

defineShortcut - minus button does not work #954

@appinteractive

Description

@appinteractive

Environment

  • Operating System: Darwin
  • Node Version: v18.16.1
  • Nuxt Version: 3.8.1
  • CLI Version: 3.9.1
  • Nitro Version: 2.7.2
  • Package Manager: pnpm@8.7.0
  • Builder: -
  • User Config: devtools, modules, ui, colorMode
  • Runtime Modules: @nuxt/ui@2.10.0, @nuxtjs/tailwindcss@6.9.4, @vueuse/nuxt@10.6.0
  • Build Modules: -

Version

v3.8.1

Reproduction

defineShortcuts({
  "+": {
    handler: () => {
      console.log("WORKS");
    },
  },
  "-": {
    handler: () => {
      console.log("DOES NOT WORK AT ALL");
    },
  },
})

Description

I try to get the minus key - working on my QWERTZ keyboard with defineShortcuts but it will not get triggered at all.
I tried minus, - and copied the exact key code to be sure that the character is not altered in any way but still no luck. The plus button works like a charm, though.

Context:

My goal is to use Shift + - for my shortcut in the end, this reproduction got rid of it for testing.
I tried shift_- in the first place and later used the whenever key in combination with the useKeyModifier("Meta") from vue-use.

Additional context

German Keyboard, QWERTZ.

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions