1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 17:27:57 +01:00

Fix interpolation of counts into key mappings.

This commit is contained in:
Kris Maglione
2010-11-18 14:03:13 -05:00
parent e8aeaeb8b4
commit e8aac67312
2 changed files with 5 additions and 3 deletions

View File

@@ -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);

View File

@@ -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;
}