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