Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ watch(devtoolsReady, (v) => {
useEventListener('keydown', (e) => {
if (e.code === 'KeyD' && e.altKey && e.shiftKey)
rpc.value.emit('toggle-panel')
if (e.code === 'KeyC' && e.altKey && e.shiftKey && vueInspectorDetected.value) {
rpc.value.emit('toggle-panel', false)
rpc.value.enableVueInspector()
}
})

watchEffect(() => {
Expand Down
10 changes: 8 additions & 2 deletions packages/overlay/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ addEventListener('keyup', (e) => {
}
})

addEventListener('keydown', (e) => {
if (e.code === 'KeyC' && e.altKey && e.shiftKey && vueInspectorSupported.value) {
toggleVueInspector()
}
})

const vueInspectorSupported = computed(() => {
return !!(devtools.ctx.state.vitePluginDetected && vueInspector.value)
})
Expand Down Expand Up @@ -117,7 +123,7 @@ const { getIframe } = useIframe(clientUrl, async () => {
<!-- panel -->
<div ref="panelEle" class="vue-devtools__panel" :style="panelStyle" @pointerdown="onPointerDown">
<div
class="vue-devtools__anchor-btn panel-entry-btn" title="Toggle Vue DevTools" aria-label="Toggle devtools panel"
class="vue-devtools__anchor-btn panel-entry-btn" title="Toggle Vue DevTools (Alt+Shift+D)" aria-label="Toggle devtools panel"
:style="panelVisible ? '' : 'filter:saturate(0)'" @click="togglePanelVisible"
>
<svg viewBox="0 0 256 198" fill="none" xmlns="http://www.w3.org/2000/svg">
Expand All @@ -130,7 +136,7 @@ const { getIframe } = useIframe(clientUrl, async () => {
<div class="vue-devtools__panel-content vue-devtools__panel-divider" />
<div
class="vue-devtools__anchor-btn vue-devtools__panel-content vue-devtools__inspector-button"
title="Toggle Component Inspector"
title="Toggle Component Inspector (Alt+Shift+C)"
:class="{ active: vueInspectorEnabled }"
@click="toggleVueInspector"
>
Expand Down