Add nmaps -> KeyMap

This commit is contained in:
Colin Caine 2018-04-14 16:55:16 +01:00
parent 35bcde6627
commit 095df8ea03

View file

@ -286,6 +286,11 @@ export function mapstrMapToKeyMap(mapstrMap: Map<string, MapTarget>): KeyMap {
return newKeyMap
}
export function mapstrObjToKeyMap(mapstrObj): KeyMap {
const mapstrMap = new Map(Object.entries(mapstrObj))
return mapstrMapToKeyMap(mapstrMap)
}
// }}}
// {{{ Utility functions for dealing with KeyboardEvents