Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 8, 2021
1 parent ed5d0cc commit 7945a85
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions packages/core/useMagicKeys/demo.vue
Expand Up @@ -2,20 +2,9 @@
import Key from './Key.vue'
import { useMagicKeys } from '.'
import { computed } from 'vue-demi'
import { whenever } from '..'
const { shift, v, u, e, s, v_u_e, u_s_e, current } = useMagicKeys()
const keys = computed(() => Array.from(current))
const { option_s } = useMagicKeys({
passive: false,
onEventFired(e) {
if (e.key === 's' && e.metaKey && e.type === 'keydown')
e.preventDefault()
},
})
whenever(option_s, () => console.log('Ctrl+S have been pressed'))
</script>

<template>
Expand Down

0 comments on commit 7945a85

Please sign in to comment.