UNPKG

@vue-flow/core

Version:

[![Vue flow](vue-flow.gif)](https://vueflow.dev/) ![top-language](https://img.shields.io/github/languages/top/bcakmakoglu/vue-flow) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/bcakmakoglu/vue-flow) ![GitHub last commit](

21 lines (19 loc) 1.04 kB
import type { MaybeRefOrGetter } from 'vue' import type { KeyFilter } from '@vueuse/core' export interface UseKeyPressOptions { target?: MaybeRefOrGetter<EventTarget | null | undefined> actInsideInputWithModifier?: MaybeRefOrGetter<boolean> preventDefault?: MaybeRefOrGetter<boolean> } export declare function isInputDOMNode(event: KeyboardEvent): boolean /** * Composable that returns a boolean value if a key is pressed * * @public * @param keyFilter - Can be a boolean, a string, an array of strings or a function that returns a boolean. If it's a boolean, it will act as if the key is always pressed. If it's a string, it will return true if a key matching that string is pressed. If it's an array of strings, it will return true if any of the strings match a key being pressed, or a combination (e.g. ['ctrl+a', 'ctrl+b']) * @param options - Options object */ export declare function useKeyPress( keyFilter: MaybeRefOrGetter<KeyFilter | boolean | null>, options?: UseKeyPressOptions, ): import('vue').ShallowRef<boolean>