added f-keys
authorjkkn <jkkn>
Fri, 2 Nov 2007 14:53:29 +0000 (14:53 +0000)
committerjkkn <jkkn>
Fri, 2 Nov 2007 14:53:29 +0000 (14:53 +0000)
content/tv2developer.js
version
webroot/index.html

index 670766ade944453deb4940213bf824d50409d7f7..b3c6cedbe007a3f73f2d21c43cbf2f093d37df0e 100755 (executable)
@@ -42,8 +42,8 @@ var TV2Developer = {
         // 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');
@@ -51,12 +51,12 @@ var TV2Developer = {
         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);
@@ -87,13 +87,20 @@ var TV2Developer = {
     },
     
     /* 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 */
diff --git a/version b/version
index 04e84f897ba9c6bd054d77d2460a71f7e898532c..c4c2d2b1109f4ee3c57b5e91d0ee882d4b593282 100644 (file)
--- a/version
+++ b/version
@@ -1 +1 @@
-0.6.10
+0.6.16
index 683d9ff3f589d9ffc14ee30ccf3e1615fb392a64..6867d39a36c32e52b863b759ffb795d93a28035b 100644 (file)
@@ -31,7 +31,7 @@
                 <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>