From 3f63ceb19046157692eac9e9a13486af7e50a57e Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 27 Feb 2016 14:44:34 +0000 Subject: Key bindings; partially functioning w/ backgound commands. --- content_scripts/vimium_frontend.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index b46175fb..26942a30 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -117,11 +117,14 @@ window.initializeModes = -> @setKeyMapping changes.normalModeKeyStateMapping.newValue commandHandler: (registryEntry, count) -> + count *= registryEntry.options.count ? 1 + count = 1 if registryEntry.noRepeat + # TODO: Repeat limit. # TODO: Special handling of Vomnibar. + # TODO: Fix passKeys. if registryEntry.isBackgroundCommand - true # Not yet implemnted. + chrome.runtime.sendMessage { handler: "runBackgroundCommand", frameId, registryEntry, count} else - count = 1 if registryEntry.noRepeat if registryEntry.passCountToFunction Utils.invokeCommandString registryEntry.command, [count] else -- cgit v1.2.3