Keystrokes icon indicating copy to clipboard operation
Keystrokes copied to clipboard

feat: expose preventDefault in react hook (#48)

Open julia-and opened this issue 1 year ago • 0 comments

So as not to break the API I opted to make preventDefault an optional parameter on the useKey and useKeyCombo hooks (React) / composables (Vue)

test: added tests for the preventDefault option in useKey/useKeyCombo for React and Vue fix: useKeyCombo Vue composable was not unbinding key combos correctly

Vue Language Server was being painfully picky about the typings in useKeyCombo so I had to extract the generic type from the keystrokes instance... someone who knows more Typescript than me likely has a nicer way to handle this.

julia-and avatar Jan 27 '25 23:01 julia-and