diff --git a/assets/javascripts/app/shortcuts.coffee b/assets/javascripts/app/shortcuts.coffee index 11140667..8ea37a24 100644 --- a/assets/javascripts/app/shortcuts.coffee +++ b/assets/javascripts/app/shortcuts.coffee @@ -104,6 +104,9 @@ class app.Shortcuts when 40 @trigger 'pageBottom' false + when 188 + @trigger 'preferences' + false handleKeydownShiftEvent: (event, _force) -> return @handleKeydownEvent(event, true) if not _force and event.which in [37, 38, 39, 40] and @swapArrowKeysBehavior() diff --git a/assets/javascripts/templates/pages/help_tmpl.coffee b/assets/javascripts/templates/pages/help_tmpl.coffee index afee16ea..c6489c1d 100644 --- a/assets/javascripts/templates/pages/help_tmpl.coffee +++ b/assets/javascripts/templates/pages/help_tmpl.coffee @@ -45,7 +45,7 @@ app.templates.helpPage = """
↓
@@ -61,8 +61,11 @@ app.templates.helpPage = """
#{ctrlKey} + enter
alt + r
+ #{navKey} + ←
@@ -83,15 +86,24 @@ app.templates.helpPage = """
#{ctrlKey} + ↑
#{ctrlKey} + ↓
alt + f
alt + r
- ctrl + ,
+ escape
+ ?
+ alt + o
alt + s
escape
- ?
-
Tip: If the cursor is no longer in the search field, press /
or
diff --git a/assets/javascripts/views/layout/document.coffee b/assets/javascripts/views/layout/document.coffee
index 6cc507dc..8a541361 100644
--- a/assets/javascripts/views/layout/document.coffee
+++ b/assets/javascripts/views/layout/document.coffee
@@ -5,10 +5,11 @@ class app.views.Document extends app.View
visibilitychange: 'onVisibilityChange'
@shortcuts:
- help: 'onHelp'
- escape: 'onEscape'
- superLeft: 'onBack'
- superRight: 'onForward'
+ help: 'onHelp'
+ preferences: 'onPreferences'
+ escape: 'onEscape'
+ superLeft: 'onBack'
+ superRight: 'onForward'
@routes:
after: 'afterRoute'
@@ -46,6 +47,11 @@ class app.views.Document extends app.View
onHelp: ->
app.router.show '/help#shortcuts'
+ return
+
+ onPreferences: ->
+ app.router.show '/settings'
+ return
onEscape: ->
path = if !app.isSingleDoc() or location.pathname is app.doc.fullPath()
@@ -54,12 +60,15 @@ class app.views.Document extends app.View
app.doc.fullPath()
app.router.show(path)
+ return
onBack: ->
history.back()
+ return
onForward: ->
history.forward()
+ return
onClick: (event) ->
return unless event.target.hasAttribute('data-behavior')