devtools icon indicating copy to clipboard operation
devtools copied to clipboard

feat: remap toggle keybinding

Open wJoenn opened this issue 1 year ago â€ĸ 4 comments

🆒 Your use case

SHIFT + ALT changed the language of my keyboard on my computer so toggling the devtool with these two keys is not possible for me

🆕 The solution you'd like

Be able to either change the keybing in nuxt.config.ts or to change the default configuration to show the devtool at the bottom of the screen like it was last time I tried it.

🔍 Alternatives you've considered

No response

ℹī¸ Additional info

No response

wJoenn avatar Oct 19 '23 19:10 wJoenn

show the devtool at the bottom of the screen like it was last time I tried it.

If you explicitly have { devtools: { enabled: true }} in your config, it should showing the panel directly.

Remapping

Yeah that sounds like a good feature to have. Any other combination you think would make sense to you?

antfu avatar Oct 19 '23 20:10 antfu

I'd probably go with ALT GR + N + D because it's not easy to find macros with SHIFT ALT or CTRL that aren't bind yet.

Thanks for the first solution, adding this did work

export default defineNuxtConfig({
  devtools: {
    enabled: true
  },
  modules: [
    "@nuxt/devtools"
  ],
})

wJoenn avatar Oct 19 '23 20:10 wJoenn

Just as addition info: This is the first time I see the nux- devtools (been a while since I scaffolded a new nuxt project). Both the keyboard shortcuts for shift+alt+d and ctrl+k don't work (or maybe work). This is just fresh of a new nuxi@latest init.

shift+alt+d does nothing, also with the nuxt-devtools panel manually clicked open.

ctrl+k: I don't know if this is supposed to be a global shortcut or not. But when I press it on the site, it goes to my browsers address bar. When I press it with the nuxt-devtools panel open, I get the nuxt-devtools command palette (so it works there).

jorismak avatar Jan 05 '24 09:01 jorismak

I'd probably go with ALT GR +

ALT-GR isn't a key on a lot of keyboards out there in the world. And even on keyboards where it says 'alt gr' on it, it has always been a second regular ALT key in my experience. So this is very locale dependent.

(Windows 11, Edge (120).

jorismak avatar Jan 05 '24 09:01 jorismak