Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/keySelector.js

Issue 4578973954605056: Fixed: Accel is always mapped to Control, no matter what the actual browser setting is (Closed)
Patch Set: Turns out, the initial patch reverted https://hg.adblockplus.org/buildtools/rev/26e006a86708 which … Created Jan. 10, 2014, 4:06 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/keySelector.js
===================================================================
--- a/lib/keySelector.js
+++ b/lib/keySelector.js
@@ -14,43 +14,43 @@
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
Cu.import("resource://gre/modules/Services.jsm");
let validModifiers =
{
- ACCEL: "control",
+ ACCEL: null,
CTRL: "control",
CONTROL: "control",
SHIFT: "shift",
ALT: "alt",
META: "meta",
__proto__: null
};
/**
* Sets the correct value of validModifiers.ACCEL.
*/
function initAccelKey()
{
+ validModifiers.ACCEL = "control";
try
{
let accelKey = Services.prefs.getIntPref("ui.key.accelKey");
if (accelKey == Ci.nsIDOMKeyEvent.DOM_VK_CONTROL)
validModifiers.ACCEL = "control";
else if (accelKey == Ci.nsIDOMKeyEvent.DOM_VK_ALT)
validModifiers.ACCEL = "alt";
else if (accelKey == Ci.nsIDOMKeyEvent.DOM_VK_META)
validModifiers.ACCEL = "meta";
}
catch(e)
{
- validModifiers.ACCEL = "control";
Cu.reportError(e);
}
}
exports.KeySelector = KeySelector;
/**
* This class provides capabilities to find and use available keyboard shortcut
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld