// We take this from ui.key.chromeAccess (no other way it seems, jkkn)
// Use 0 for disabled, 1 for Shift, 2 for Ctrl, 4 for Alt, 8 for Meta
// (values can be combined, e.g. 5 for Alt+Shift)
-// var altKey = []; // ALT on windows, CONTROL on mac
-/* var chromeAccess =
+ var altKey = []; // ALT on windows, CONTROL on mac
+ var chromeAccess =
Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService)
.getBranch('ui.key.').getIntPref('chromeAccess');
if (chromeAccess & 1) altKey.push('shift');
if (chromeAccess & 4) altKey.push('alt');
if (chromeAccess & 8) altKey.push('meta');
if (altKey.length > 0) {
- altKey = altKey.join(',');*/
- var altKey = 'alt';
- this._addShortcut(shortcuts, 'tv2-key-open', altKey, '1', 'TV2Developer.handleKeyShortcut(event)');
- this._addShortcut(shortcuts, 'tv2-key-repeat', altKey, '2', 'TV2Developer.handleButton(event)');
- this._addShortcut(shortcuts, 'tv2-key-quick', altKey, '3', 'TV2Developer.openQuickbox(event)');
-// }
+ altKey = altKey.join(',');
+ this._addShortcut(shortcuts, 'tv2-key-open-1', altKey, '1', 'VK_F1', 'TV2Developer.handleKeyShortcut(event)');
+ this._addShortcut(shortcuts, 'tv2-key-repeat-1', altKey, '2', 'VK_F2', 'TV2Developer.handleButton(event)');
+ this._addShortcut(shortcuts, 'tv2-key-quick-1', altKey, '3', 'VK_F3', 'TV2Developer.openQuickbox(event)');
+ }
+
// first run, add icon
if (this.getPref('firstRun')) {
this.setPref('firstRun', false);
},
/* utility function to create shortcut object */
- _addShortcut: function(parent, id, modifiers, key, oncommand) {
+ _addShortcut: function(parent, id, modifiers, key, fkeycode, oncommand) {
var newKey = document.createElement('key');
newKey.setAttribute('id', id);
newKey.setAttribute('modifiers', modifiers);
newKey.setAttribute('key', key);
newKey.setAttribute('oncommand', oncommand);
parent.appendChild(newKey);
+ // also add F-key shortcut
+ newKey = document.createElement('key');
+ newKey.setAttribute('id', id+'-fkey');
+ newKey.setAttribute('modifiers', 'accel');
+ newKey.setAttribute('keycode', fkeycode);
+ newKey.setAttribute('oncommand', oncommand);
+ parent.appendChild(newKey);
},
/* string methods for localizations */
<li>Åbn siden op i Tangos requeue værktøj (evt. udfra Tango_URL hvis siden har sat denne).</li>
<li>Se alle database forespørgsler på siden ved at køre DB_PDO_Logging værktøjet på siden.</li>
<em>Browserens cache tømmes desuden automatisk</em>.</li>
- <li>Quick link dialog, hvor man hurtig kan navigere hen til et tv2.dk site - genvej <code>ALT+3</code></li>
+ <li>Quick link dialog, hvor man hurtig kan navigere hen til et tv2.dk site - genvej <code>ALT+3</code>, (Eller, Windows:<code>CTRL+F3</code>, Mac:<code>Command+F3</code>)</li>
</ul>
<h3>Feature liste på i2-images og i2-files:</h3>
<ul>
<li>Mulighed for at validere nuværende side via W3C Validatoren.</li>
<li>Følgende sites genkendes som php5 sites og håndteres derefter mht. til test vs. test3 og snapshot og snapshot3:<br/><code>1234, nyhederne, i2</code>.</li>
<li>Genvejstast til menuen: <code>ALT+1</code>
+ (eller Windows:<code>CTRL+F1</code>, Mac: <code>Command+F1</code>)</li>
<li>Genvejstast til senest benyttede funktion i menuen: <code>ALT+2</code>
+ (eller Windows:<code>CTRL+F2</code>, Mac: <code>Command+F2</code>)</li>
<li>Genvejstast til quick link dialogen: <code>ALT+3</code>
+ (eller Windows:<code>CTRL+F3</code>, Mac: <code>Command+F3</code>)</li>
<li>Links opfører sig som normale links, således <code>CTRL</code> kan bruges til at åbne i ny tab, <code>CTRL+SHIFT</code> i en ny tab i baggrunden, <code>SHIFT</code> i ny vindue, osv..</li>
<li>(Bemærk at på mac er det nødvendigt at slå accesskeys til - dette kan gøres under indstillingerne i pluginen).</li>
</ul>