Skip to content

Commit d05a9af

Browse files
fix: add Alt modifier to inspect hotkey default to avoid browser conflicts (#357)
* fix: add Alt modifier to inspect hotkey default to avoid browser conflicts The previous default (Shift + CtrlOrMeta) overlaps with browser shortcuts for opening links in new tabs (Ctrl/Cmd + Shift + Click in Chrome, Edge, Safari). Adding Alt/Option as a third modifier avoids all known OS, browser, and common web app shortcut collisions. * chore: add changeset for inspect hotkey default change * ci: apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 16d96c7 commit d05a9af

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/devtools': patch
3+
---
4+
5+
Changed default `inspectHotkey` from `["Shift", "CtrlOrMeta"]` to `["Shift", "Alt", "CtrlOrMeta"]` to avoid conflicts with browser shortcuts (Ctrl/Cmd + Shift + Click opens links in new tabs).

packages/devtools/src/context/devtools-store.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export type DevtoolsStore = {
5454
openHotkey: Array<KeyboardKey>
5555
/**
5656
* The hotkey to open the source inspector
57-
* @default ["Shift", "CtrlOrMeta"]
57+
* @default ["Shift", "Alt", "CtrlOrMeta"]
5858
*/
5959
inspectHotkey: Array<KeyboardKey>
6060
/**
@@ -100,7 +100,7 @@ export const initialState: DevtoolsStore = {
100100
position: 'bottom-right',
101101
panelLocation: 'bottom',
102102
openHotkey: ['Control', '~'],
103-
inspectHotkey: ['Shift', 'CtrlOrMeta'],
103+
inspectHotkey: ['Shift', 'Alt', 'CtrlOrMeta'],
104104
requireUrlFlag: false,
105105
urlFlag: 'tanstack-devtools',
106106
theme:

0 commit comments

Comments
 (0)