From 951f8839d02a8d85747d86ccd09efc0ee3a72501 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 23 Aug 2014 15:26:03 +0100 Subject: Allow passing of keys to the underlying page (more minor code review). --- content_scripts/vimium_frontend.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'content_scripts') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 70cc5cbb..feebda07 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -117,6 +117,7 @@ initializePreDomReady = -> getScrollPosition: -> scrollX: window.scrollX, scrollY: window.scrollY setScrollPosition: (request) -> setScrollPosition request.scrollX, request.scrollY executePageCommand: executePageCommand + # FIXME: currentKeyQueue(), below, does not respect the frameId. Should it? currentKeyQueue: (request) -> keyQueue = request.keyQueue getActiveState: -> { enabled: isEnabledForUrl } disableVimium: disableVimium @@ -329,7 +330,7 @@ extend window, # passKey, then 'gt' and '99t' will neverthless be handled by vimium. # TODO: This currently only works for unmodified keys (so not for '', or the like). It's not clear if # this is a problem or not. I don't recall coming across a web page with modifier key bindings. Such -# bindings might be too likely to conflict with browser bindings. +# bindings might be too likely to conflict with browsers' native bindings. isPassKey = ( keyChar ) -> !keyQueue and passKeys and 0 <= passKeys.indexOf keyChar -- cgit v1.2.3