mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 10:01:39 -05:00
Tighten key bind types to string -> string
This commit is contained in:
parent
ab4aaa19ca
commit
05fd0a26d7
1 changed files with 3 additions and 3 deletions
|
@ -374,14 +374,14 @@ export function translateKeysInPlace(keys, conf): void {
|
||||||
export function keyMap(conf): KeyMap {
|
export function keyMap(conf): KeyMap {
|
||||||
if (KEYMAP_CACHE[conf]) return KEYMAP_CACHE[conf]
|
if (KEYMAP_CACHE[conf]) return KEYMAP_CACHE[conf]
|
||||||
|
|
||||||
let maps: any = config.get(conf)
|
const mapobj: {[keyseq: string]: string} = config.get(conf)
|
||||||
if (maps === undefined)
|
if (mapobj === undefined)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"No binds defined for this mode. Reload page with <C-r> and add binds, e.g. :bind --mode=[mode] <Esc> mode normal",
|
"No binds defined for this mode. Reload page with <C-r> and add binds, e.g. :bind --mode=[mode] <Esc> mode normal",
|
||||||
)
|
)
|
||||||
|
|
||||||
// Convert to KeyMap
|
// Convert to KeyMap
|
||||||
maps = new Map(Object.entries(maps))
|
const maps = new Map(Object.entries(mapobj))
|
||||||
KEYMAP_CACHE[conf] = mapstrMapToKeyMap(maps)
|
KEYMAP_CACHE[conf] = mapstrMapToKeyMap(maps)
|
||||||
return KEYMAP_CACHE[conf]
|
return KEYMAP_CACHE[conf]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue