Change alt+tab shortcut to alt+rarr

pull/90/head
Thibaut 11 years ago
parent fa0941a037
commit 6cfc8fc50b

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

@ -78,7 +78,7 @@ app.templates.helpPage = """
<h3 class="_shortcuts-title">Misc</h3>
<dl class="_shortcuts-dl">
<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)
<dt class="_shortcuts-dt">
<code class="_shortcut-code">alt + r</code>

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

Loading…
Cancel
Save