| OLD | NEW |
| 1 /* | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
| 2 * This file is part of the Adblock Plus build tools, | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 4 * | |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | |
| 6 * it under the terms of the GNU General Public License version 3 as | |
| 7 * published by the Free Software Foundation. | |
| 8 * | |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 12 * GNU General Public License for more details. | |
| 13 * | |
| 14 * You should have received a copy of the GNU General Public License | |
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | |
| 16 */ | |
| 17 | 4 |
| 18 Cu.import("resource://gre/modules/Services.jsm"); | 5 Cu.import("resource://gre/modules/Services.jsm"); |
| 19 | 6 |
| 20 let validModifiers = | 7 let validModifiers = |
| 21 { | 8 { |
| 22 ACCEL: null, | 9 ACCEL: null, |
| 23 CTRL: "control", | 10 CTRL: "control", |
| 24 CONTROL: "control", | 11 CONTROL: "control", |
| 25 SHIFT: "shift", | 12 SHIFT: "shift", |
| 26 ALT: "alt", | 13 ALT: "alt", |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 return false; | 206 return false; |
| 220 if (key.meta != event.metaKey || key.control != event.ctrlKey) | 207 if (key.meta != event.metaKey || key.control != event.ctrlKey) |
| 221 return false; | 208 return false; |
| 222 | 209 |
| 223 if (key.char && event.charCode && String.fromCharCode(event.charCode).toUpperC
ase() == key.char) | 210 if (key.char && event.charCode && String.fromCharCode(event.charCode).toUpperC
ase() == key.char) |
| 224 return true; | 211 return true; |
| 225 if (key.code && event.keyCode && event.keyCode == key.code) | 212 if (key.code && event.keyCode && event.keyCode == key.code) |
| 226 return true; | 213 return true; |
| 227 return false; | 214 return false; |
| 228 }; | 215 }; |
| OLD | NEW |