From a5834b9b18c7c85f75e772e02a9dc4115f309ca4 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 3 Dec 2010 23:48:11 -0500 Subject: [PATCH] Only bitch about unknown keys in TEXT EDIT mode. --- common/content/events.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/common/content/events.js b/common/content/events.js index 392bdb63..2d903636 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -969,17 +969,15 @@ const Events = Module("events", { this._input.motionCount = null; if (!isEscape(key)) { - // allow key to be passed to the host app if we can't handle it - stop = (mode.main === modes.TEXT_EDIT); - - if (mode.main === modes.COMMAND_LINE) { - if (!(modes.extended & modes.INPUT_MULTILINE)) - dactyl.trapErrors(function () { - commandline.onEvent(event); // reroute event in command line mode - }); - } - else if (!mode.mainMode.input) + if (mode.main === modes.TEXT_EDIT) { dactyl.beep(); + stop = true; + } + + if (mode.main === modes.COMMAND_LINE) + if (!(modes.extended & modes.INPUT_MULTILINE)) + dactyl.trapErrors(commandline.onEvent, commandline, event); + // allow key to be passed to the host app if we can't handle it } }