diff --git a/src/components/timer.vue b/src/components/timer.vue index 5ecb3d5..4b7966f 100644 --- a/src/components/timer.vue +++ b/src/components/timer.vue @@ -6,6 +6,8 @@ const { proxy } = getCurrentInstance(); + const descriptionInput = ref(null) + onMounted(()=>{ window.addEventListener('keydown', (event)=>{ if(event.key === 'ArrowDown'){ @@ -15,8 +17,12 @@ event.preventDefault() proxy.stop() } - if(event.key === 'Enter' && event.metaKey === true){ - proxy.submit(event) + if(event.ctrlKey === true){ + if(event.key === 'Enter'){ + proxy.submit(event) + } else if(event.key === 'd') { + descriptionInput.value.focus() + } } }) }) @@ -26,7 +32,12 @@ import CategoryChooser from './category_chooser.vue' import { getHours, getMinutes, createTimeObj, getAccumulatedSeconds, formatSeconds } from '../libs/time.js' - import { copiedSongs, currentWorkingCategory, currentWorkingInstrument, description } from '../libs/state.js' + import { + copiedSongs, + currentWorkingCategory, + currentWorkingInstrument, + description + } from '../libs/state.js' const removeSong = (song) => { copiedSongs.value = copiedSongs.value.filter(curr => curr !== song) @@ -217,7 +228,7 @@
- +