shell-ahk
Version:
`Lodash`/`jQuery` for `AHK`.
33 lines (29 loc) • 865 B
TypeScript
type Item = [Name, Function]
type KeyMixed = string
type Key = string
type Name = string
export class KeyBindingShell {
mapBound: Record<Key, Function>
mapCallback: Record<Key, Item[]>
mapPrevented: Record<Key, boolean>
constructor()
add(keyMixed: KeyMixed, callback: Function): void
fire(keyMixed: KeyMixed): void
private formatKey(key: Key, prefix?: '~' | ''): Key
getListItem(keyMixed: KeyMixed): Item[]
isPrevented(key: Key): boolean
private prepare(key: Key): void
prevent(key: Key, isPrevented: boolean): void
register(key: Key): void
remove(keyMixed: KeyMixed): void
}
declare global {
interface KeyBindingShellConstructor {
new (): KeyBindingShell
}
const KeyBindingShell: KeyBindingShellConstructor
}
declare module './keyBindingShell' {
/** Key binding operations shell class */
export default KeyBindingShell
}