Change alt+rarr shortcut to alt+f

Avoid conflict with OS X text input keyboard navigation
pull/114/head
Thibaut 11 years ago
parent 975f89b882
commit 2cae43f4e8

@ -100,11 +100,11 @@ class app.Shortcuts
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
when 70
@trigger 'altF', event
when 71 when 71
@trigger 'altG' @trigger 'altG'
false false

@ -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 + &rarr;</code> <code class="_shortcut-code">alt + f</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>

@ -12,7 +12,7 @@ class app.views.Content extends app.View
pageDown: 'scrollPageDown' pageDown: 'scrollPageDown'
home: 'scrollToTop' home: 'scrollToTop'
end: 'scrollToBottom' end: 'scrollToBottom'
altRight: 'onAltRight' altF: 'onAltF'
@routes: @routes:
before: 'beforeRoute' before: 'beforeRoute'
@ -151,7 +151,7 @@ class app.views.Content extends app.View
$.popup(link) $.popup(link)
return return
onAltRight: (event) => onAltF: (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)

Loading…
Cancel
Save