fix(core): allow control key as pan activation key code (#1707)

* fix(core): allow control key as pan activation key code

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(changeset): add

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* fix(core): allow drag regardless of btn chosen

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* fix(core): prevent browser ctx menu on pane right click

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(core): cleanup useKeyPress handler

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* fix(core): check `panOnDrag` prop for allowed drag buttons

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(changeset): add

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(core): cleanup

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

---------

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2024-12-07 16:39:07 +01:00
parent 7a022c89c6
commit f4f2494fd1
6 changed files with 26 additions and 17 deletions
+2 -4
View File
@@ -1,5 +1,5 @@
import type { MaybeRefOrGetter } from 'vue'
import { onMounted, ref, toRef, toValue, watch } from 'vue'
import { ref, toRef, toValue, watch } from 'vue'
import type { KeyFilter, KeyPredicate } from '@vueuse/core'
import { onKeyStroke, useEventListener } from '@vueuse/core'
@@ -111,9 +111,7 @@ export function useKeyPress(keyFilter: MaybeRefOrGetter<KeyFilter | boolean | nu
},
)
onMounted(() => {
useEventListener(window, ['blur', 'contextmenu'], reset)
})
useEventListener(['blur', 'contextmenu'], reset)
onKeyStroke(
(...args) => currentFilter(...args),