ソースを参照

Change alt+tab shortcut to alt+rarr

Thibaut 11 年 前
コミット
6cfc8fc50b

+ 3 - 1
assets/javascripts/app/shortcuts.coffee

@@ -96,10 +96,12 @@ class app.Shortcuts
   handleKeydownAltEvent: (event) ->
   handleKeydownAltEvent: (event) ->
     switch event.which
     switch event.which
       when 9
       when 9
-        @trigger 'altTab', event
+        @trigger 'altRight', event
       when 38
       when 38
         @trigger 'altUp'
         @trigger 'altUp'
         false
         false
+      when 39
+        @trigger 'altRight', event
       when 40
       when 40
         @trigger 'altDown'
         @trigger 'altDown'
         false
         false

+ 1 - 1
assets/javascripts/templates/pages/help_tmpl.coffee

@@ -78,7 +78,7 @@ app.templates.helpPage = """
   <h3 class="_shortcuts-title">Misc</h3>
   <h3 class="_shortcuts-title">Misc</h3>
   <dl class="_shortcuts-dl">
   <dl class="_shortcuts-dl">
     <dt class="_shortcuts-dt">
     <dt class="_shortcuts-dt">
-      <code class="_shortcut-code">alt + tab</code>
+      <code class="_shortcut-code">alt + &rarr;</code>
     <dd class="_shortcuts-dd">Focus first link in the content area<br>(press tab to focus the other links)
     <dd class="_shortcuts-dd">Focus first link in the content area<br>(press tab to focus the other links)
     <dt class="_shortcuts-dt">
     <dt class="_shortcuts-dt">
       <code class="_shortcut-code">alt + r</code>
       <code class="_shortcut-code">alt + r</code>

+ 2 - 2
assets/javascripts/views/content/content.coffee

@@ -12,7 +12,7 @@ class app.views.Content extends app.View
     pageDown: 'scrollPageDown'
     pageDown: 'scrollPageDown'
     home:     'scrollToTop'
     home:     'scrollToTop'
     end:      'scrollToBottom'
     end:      'scrollToBottom'
-    altTab:   'onAltTab'
+    altRight:   'onAltRight'
 
 
   @routes:
   @routes:
     before: 'beforeRoute'
     before: 'beforeRoute'
@@ -151,7 +151,7 @@ class app.views.Content extends app.View
       $.popup(link)
       $.popup(link)
     return
     return
 
 
-  onAltTab: (event) =>
+  onAltRight: (event) =>
     unless document.activeElement and $.hasChild @el, document.activeElement
     unless document.activeElement and $.hasChild @el, document.activeElement
       @findByTag('a').focus()
       @findByTag('a').focus()
       $.stopEvent(event)
       $.stopEvent(event)