chore(common): analytics on spotlight (#3727)
Co-authored-by: amk-dev <akash.k.mohan98@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { onBeforeUnmount, onMounted } from "vue"
|
||||
import { HoppActionWithNoArgs, invokeAction } from "./actions"
|
||||
import { HoppActionWithOptionalArgs, invokeAction } from "./actions"
|
||||
import { isAppleDevice } from "./platformutils"
|
||||
import { isDOMElement, isTypableElement } from "./utils/dom"
|
||||
|
||||
@@ -40,7 +40,7 @@ type SingleCharacterShortcutKey = `${Key}`
|
||||
type ShortcutKey = ModifierBasedShortcutKey | SingleCharacterShortcutKey
|
||||
|
||||
export const bindings: {
|
||||
[_ in ShortcutKey]?: HoppActionWithNoArgs
|
||||
[_ in ShortcutKey]?: HoppActionWithOptionalArgs
|
||||
} = {
|
||||
"ctrl-enter": "request.send-cancel",
|
||||
"ctrl-i": "request.reset",
|
||||
@@ -96,7 +96,7 @@ function handleKeyDown(ev: KeyboardEvent) {
|
||||
if (!boundAction) return
|
||||
|
||||
ev.preventDefault()
|
||||
invokeAction(boundAction)
|
||||
invokeAction(boundAction, undefined, "keypress")
|
||||
}
|
||||
|
||||
function generateKeybindingString(ev: KeyboardEvent): ShortcutKey | null {
|
||||
|
||||
Reference in New Issue
Block a user