diff --git a/common/content/events.js b/common/content/events.js index 0e20bb87..e2331780 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -372,8 +372,6 @@ var Events = Module("events", { if (quiet) commandline.quiet = quiet; - keys = mappings.expandLeader(keys); - for (let [, evt_obj] in Iterator(DOM.Event.parse(keys))) { let now = Date.now(); let key = DOM.Event.stringify(evt_obj); diff --git a/common/content/hints.js b/common/content/hints.js index bc3180d7..73059aae 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -722,7 +722,7 @@ var HintSession = Class("HintSession", CommandMode, { * Display the current status to the user. */ updateStatusline: function _updateStatusline() { - statusline.inputBuffer = (this.escapeNumbers ? options["mapleader"] : "") + + statusline.inputBuffer = (this.escapeNumbers ? "\\" : "") + (this.hintNumber ? this.getHintString(this.hintNumber) : ""); }, }); @@ -1266,7 +1266,7 @@ var Hints = Module("hints", { "Delete the previous character", function ({ self }) self.backspace()); - bind([""], + bind(["\\"], "Toggle hint filtering", function ({ self }) { self.escapeNumbers = !self.escapeNumbers; }); }, diff --git a/common/content/mappings.js b/common/content/mappings.js index 149f3fb8..67385d97 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -355,7 +355,7 @@ var Mappings = Module("mappings", { get userHives() this.allHives.filter(function (h) h !== this.builtin, this), - expandLeader: function expandLeader(keyString) keyString.replace(//i, function () options["mapleader"]), + expandLeader: deprecated("your brain", function expandLeader(keyString) keyString), prefixes: Class.Memoize(function () { let list = Array.map("CASM", function (s) s + "-"); @@ -365,8 +365,6 @@ var Mappings = Module("mappings", { }), expand: function expand(keys) { - keys = keys.replace(//i, options["mapleader"]); - if (!/<\*-/.test(keys)) var res = keys; else @@ -541,7 +539,7 @@ var Mappings = Module("mappings", { args["-builtin"] = true; if (!rhs) // list the mapping - mappings.list(mapmodes, mappings.expandLeader(lhs), hives); + mappings.list(mapmodes, lhs, hives); else { util.assert(args["-group"].modifiable, _("map.builtinImmutable")); @@ -828,18 +826,10 @@ var Mappings = Module("mappings", { function (context, obj, args) [[m.names, m.description] for (m in this.iterate(args[0]))] ]); }, - options: function initOptions(dactyl, modules, window) { - options.add(["mapleader", "ml"], - "Define the replacement keys for the pseudo-key", - "string", "\\", { - setter: function (value) { - if (this.hasChanged) - for (let hive in values(mappings.allHives)) - for (let stack in values(hive.stacks)) - delete stack.states; - return value; - } - }); + mappings: function initMappings(dactyl, modules, window) { + mappings.add([modes.COMMAND], + ["\\"], "Emits pseudo-key", + function () { events.feedkeys("") }); } }); diff --git a/common/locale/en-US/hints.xml b/common/locale/en-US/hints.xml index 769f7da7..571afab7 100644 --- a/common/locale/en-US/hints.xml +++ b/common/locale/en-US/hints.xml @@ -48,7 +48,7 @@
Moves the focus to the next hintable element
-
+
\
Temporarily treats all numbers (or other keys, depending on the value of hintkeys) as ordinary text
diff --git a/common/locale/en-US/map.xml b/common/locale/en-US/map.xml index 9ff5c88b..39e81cbc 100644 --- a/common/locale/en-US/map.xml +++ b/common/locale/en-US/map.xml @@ -395,25 +395,6 @@ - - \]]> - - ]]> - -

- A pseudo-key which expands to the value of the mapleader - option. For example, by default, -

- :map h :echo Hello -

works like

- :map \h :echo Hello -

but after

- , -

it works like

- :map ,h :echo Hello -
-
-

Mapping examples

Make do the same as in input modes:

diff --git a/common/locale/en-US/options.xml b/common/locale/en-US/options.xml index 24566080..92abf233 100644 --- a/common/locale/en-US/options.xml +++ b/common/locale/en-US/options.xml @@ -694,7 +694,7 @@ &option.extendedhinttags.type; [asOTvVWy]:':-moz-any-link',area[href],img[src],iframe[src], - [A]:[id], + [A]:[id],a[name], [f]:body, [F]:body,code,div,html,p,pre,span, [iI]:img, @@ -1116,16 +1116,6 @@ - - 'ml' 'mapleader' - 'mapleader' 'ml' - &option.mapleader.type; - &option.mapleader.default; - -

Defines the replacement keys for the pseudo-key.

-
-
- 'maxitems' 'maxitems' diff --git a/pentadactyl/NEWS b/pentadactyl/NEWS index c2901f64..4d3ba41c 100644 --- a/pentadactyl/NEWS +++ b/pentadactyl/NEWS @@ -217,8 +217,8 @@ still be used for this purpose. [b4] - 'loadplugins' is now a [regexplist] option rather than a boolean. [b2] - - 'mapleader' is now an option rather than a :let - variable. [b4] + - 'mapleader' is no longer an option rather or a :let + variable. [b4][rc2] - 'passkeys' is now a [sitemap] with key chain support rather than a [regexpmap]. [b6] - The precise format of 'sanitizeitems' has changed slightly. [b8]