mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 21:17:59 +01:00
Fix interpolation of counts into key mappings.
This commit is contained in:
@@ -330,7 +330,7 @@ const Command = Class("Command", {
|
|||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case "-keys":
|
case "-keys":
|
||||||
let silent = args["-silent"];
|
let silent = args["-silent"];
|
||||||
rhs = events.canonicalKeys(rhs);
|
rhs = events.canonicalKeys(rhs, true);
|
||||||
var action = function action(count)
|
var action = function action(count)
|
||||||
events.feedkeys(commands.replaceTokens(rhs, { count: count }),
|
events.feedkeys(commands.replaceTokens(rhs, { count: count }),
|
||||||
noremap, silent);
|
noremap, silent);
|
||||||
|
|||||||
@@ -352,8 +352,8 @@ const Events = Module("events", {
|
|||||||
* @param {string} keys Messy form.
|
* @param {string} keys Messy form.
|
||||||
* @returns {string} Canonical form.
|
* @returns {string} Canonical form.
|
||||||
*/
|
*/
|
||||||
canonicalKeys: function (keys) {
|
canonicalKeys: function (keys, unknownOk) {
|
||||||
return events.fromString(keys).map(events.closure.toString).join("");
|
return events.fromString(keys, unknownOk).map(events.closure.toString).join("");
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -545,6 +545,8 @@ const Events = Module("events", {
|
|||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (key == null)
|
||||||
|
key = event.dactylKeyname;
|
||||||
if (key == null)
|
if (key == null)
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user