diff --git a/common/content/commands.js b/common/content/commands.js index 12fe55e5..478b5263 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -330,7 +330,7 @@ const Command = Class("Command", { /* fallthrough */ case "-keys": let silent = args["-silent"]; - rhs = events.canonicalKeys(rhs); + rhs = events.canonicalKeys(rhs, true); var action = function action(count) events.feedkeys(commands.replaceTokens(rhs, { count: count }), noremap, silent); diff --git a/common/content/events.js b/common/content/events.js index 26e409a8..b3fa5a27 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -352,8 +352,8 @@ const Events = Module("events", { * @param {string} keys Messy form. * @returns {string} Canonical form. */ - canonicalKeys: function (keys) { - return events.fromString(keys).map(events.closure.toString).join(""); + canonicalKeys: function (keys, unknownOk) { + return events.fromString(keys, unknownOk).map(events.closure.toString).join(""); }, /** @@ -545,6 +545,8 @@ const Events = Module("events", { return key; } } + if (key == null) + key = event.dactylKeyname; if (key == null) return null; }