mirror of
https://github.com/vale981/tridactyl
synced 2025-03-10 20:56:37 -04:00
14 lines
406 B
TypeScript
Executable file
14 lines
406 B
TypeScript
Executable file
/** Tridactyl normal mode */
|
|
|
|
import * as config from "../config"
|
|
import * as keyseq from "../keyseq"
|
|
|
|
export function parser(keys): keyseq.ParserResponse {
|
|
let nmaps: any = config.get("nmaps")
|
|
// Remove unbound keys
|
|
nmaps = Object.entries(nmaps).filter(([k, v]) => v !== "")
|
|
// Convert to KeyMap
|
|
nmaps = keyseq.mapstrMapToKeyMap(new Map(nmaps))
|
|
|
|
return keyseq.parse(keys, nmaps)
|
|
}
|