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
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ export default defineComponent({

onKeyDown((event) => {
// ƒ,ß,® - these are the result keys in Mac with altKey pressed
if ((event.key === 'f' || event.key === 'ƒ') && event.altKey) {
if (((['f', 'ƒ', 'а']).includes(event.key)) && event.altKey) {
treeFilterInput.value.focus()
return false
}
else if ((event.key === 's' || event.key === 'ß') && event.altKey && !pickingComponent.value) {
else if ((['s', 'ß', 'ы']).includes(event.key) && event.altKey && !pickingComponent.value) {
startPickingComponent()
return false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import StateInspector from '@front/features/inspector/StateInspector.vue'
import EmptyPane from '@front/features/layout/EmptyPane.vue'

import { computed, defineComponent, ref, watch } from 'vue'
import { SharedData, copyToClipboard, getComponentDisplayName } from '@vue-devtools/shared-utils'
import { SharedData, copyToClipboard, getComponentDisplayName, openInEditor } from '@vue-devtools/shared-utils'
import { onKeyDown } from '@front/util/keyboard'
import RenderCode from './RenderCode.vue'
import { useSelectedComponent } from './composable'
Expand Down Expand Up @@ -34,10 +34,18 @@ export default defineComponent({
const stateFilterInput = ref()
onKeyDown((event) => {
// ∂ - the result key in Mac with altKey pressed
if ((event.key === 'd' || event.key === '∂') && event.altKey) {
if ((['d', '∂', 'в'].includes(event.key)) && event.altKey) {
stateFilterInput.value.focus()
return false
}

if ((['o', 'o', 'щ']).includes(event.key) && event.altKey) {
const file = selectedComponent.data.value?.file
if (file) {
openInEditor(file)
}
return false
}
}, true)

const sameApp = computed(() => selectedComponent.data.value?.id.split(':')[0] === selectedComponentId.value?.split(':')[0])
Expand Down
2 changes: 1 addition & 1 deletion packages/app-frontend/src/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default {
},
ComponentInspector: {
openInEditor: {
tooltip: 'Open <mono><<insert_drive_file>>{{file}}</mono> in editor',
tooltip: '[[{{keys.alt}}]] + [[O]] Open <mono><<insert_drive_file>>{{file}}</mono> in editor',
},
},
EventsHistory: {
Expand Down