File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/0/src/composables/useKeydown Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export interface KeyHandler {
1010}
1111
1212export interface UseKeydownOptions {
13- autoStart ?: boolean
13+ immediate ?: boolean
1414}
1515
1616let globalListener : ( ( event : KeyboardEvent ) => void ) | null = null
@@ -52,7 +52,7 @@ function stopGlobalListener () {
5252 */
5353
5454export function useKeydown ( handlers : KeyHandler [ ] | KeyHandler , options : UseKeydownOptions = { } ) {
55- const { autoStart = true } = options
55+ const { immediate = true } = options
5656 const keyHandlers = Array . isArray ( handlers ) ? handlers : [ handlers ]
5757 const handlerIds = ref < ID [ ] > ( [ ] )
5858 const isListening = ref ( false )
@@ -89,7 +89,7 @@ export function useKeydown (handlers: KeyHandler[] | KeyHandler, options: UseKey
8989 }
9090 }
9191
92- if ( getCurrentScope ( ) && autoStart ) {
92+ if ( getCurrentScope ( ) && immediate ) {
9393 onMounted ( startListening )
9494 }
9595
You can’t perform that action at this time.
0 commit comments