Pass KeyShortcutHandler consumers a printable prefixmap represention. Close #154.

This commit is contained in:
2022-10-08 21:20:08 +00:00
parent 2bbccad2d5
commit 268269114a
6 changed files with 19 additions and 16 deletions

View File

@@ -18,7 +18,7 @@ interface ArchiveUI {
*/
var shortcutHandler(default, null):Null<KeyShortcutHandler<Entry>>;
function showPrefixMap(map:Map<String,ShortcutKey<Entry>>):Void;
function showPrefixMap(map:Map<String,String>):Void;
function hidePrefixMap():Void;
/**

View File

@@ -11,7 +11,7 @@
{
(when (and ui ui.shortcutHandler)
(unless setup
(set ui.shortcutHandler.onSelectPrefixMap ui.showPrefixMap)
(set ui.shortcutHandler.onSelectPrefixMap ->:Void [_ map] (ui.showPrefixMap map))
(set ui.shortcutHandler.onSelectItem
->e {
(ui.hidePrefixMap)