1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-03 21:25:46 +01:00

Use globbed modifiers for pass through keys.

This commit is contained in:
Kris Maglione
2011-03-14 15:45:05 -04:00
parent f8bd1fd4fb
commit 9c0180a8a3
2 changed files with 4 additions and 9 deletions

View File

@@ -655,14 +655,8 @@ var Editor = Module("editor", {
// Ugh.
mappings.add([modes.INPUT, modes.CARET],
["<CR>", "<BS>", "<Del>", "<Left>", "<Right>", "<Up>", "<Down>",
"<Home>", "<End>", "<PageUp>", "<PageDown>",
"<C-CR>", "<C-BS>", "<C-Del>", "<C-Left>", "<C-Right>", "<C-Up>", "<C-Down>",
"<C-Home>", "<C-End>", "<C-PageUp>", "<C-PageDown>",
"<S-CR>", "<S-BS>", "<S-Del>", "<S-Left>", "<S-Right>", "<S-Up>", "<S-Down>",
"<S-Home>", "<S-End>", "<S-PageUp>", "<S-PageDown>",
"<C-S-CR>", "<C-S-BS>", "<C-S-Del>", "<C-S-Left>", "<C-S-Right>", "<C-S-Up>", "<C-S-Down>",
"<C-S-Home>", "<C-S-End>", "<C-S-PageUp>", "<C-S-PageDown>"],
["<*-CR>", "<*-BS>", "<*-Del>", "<*-Left>", "<*-Right>", "<*-Up>", "<*-Down>",
"<*-Home>", "<*-End>", "<*-PageUp>", "<*-PageDown>"],
"Handled by " + config.host,
function () Events.PASS);

View File

@@ -309,7 +309,8 @@ var Mappings = Module("mappings", {
expandLeader: deprecated("expand", function expandLeader(keyString) keyString.replace(/<Leader>/i, options["mapleader"])),
prefixes: Class.memoize(function () {
let list = Array.slice("CASM").map(function (s) s + "-");
let list = Array.map("CASM", function (s) s + "-");
return iter(util.range(0, 1 << list.length)).map(function (mask)
list.filter(function (p, i) mask & (1 << i)).join("")).toArray().concat("*-");
}),