From 7c5fb2c312b9140c2dd091f792535ae8f592ecdb Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 26 Feb 2016 16:47:17 +0000 Subject: Key bindings; initial "generic" class. This implements a generic front-end class for key handling (a la normal mode). Also: - supports count prefixes (or not) - supports multi-key mappings (longer than two) Also included is a very poor-man's demo. See the bottom of mode_key_handler.coffee for some hard-wired key bindings. IMPORTANT: This does not actually work as Vimium. It's just a demo. --- content_scripts/vimium_frontend.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'content_scripts/vimium_frontend.coffee') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 667031dc..bce5f632 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -112,7 +112,8 @@ window.initializeModes = -> # Install the permanent modes. The permanently-installed insert mode tracks focus/blur events, and # activates/deactivates itself accordingly. - new NormalMode + # new NormalMode + new KeyHandlerMode commandHandler: demoCommandHandler, keyMapping: demoKeyMapping, indicator: "Demo mode." new PassKeysMode new InsertMode permanent: true Scroller.init() -- cgit v1.2.3