ctrlKey = if $.isMac() then 'cmd' else 'ctrl' navKey = if $.isWindows() then 'alt' else ctrlKey app.templates.helpPage = """

Help

The search is case-insensitive and supports fuzzy matching (for queries longer than two characters). For example, searching bgcp brings up background-clip.
Abbreviations are also supported (full list below). For example, $ is an alias for jQuery.

You can scope the search to a single documentation by typing its name (or an abbreviation), and pressing Tab (Space on mobile devices). For example, to search the JavaScript documentation, enter javascript or js, then Tab.
To clear the current scope, empty the search field and hit Backspace.
The search field can be prefilled from the URL by visiting devdocs.io/#q=keyword. Characters after #q= will be used as search string.
To search a single documentation, add its name and a space before the keyword: devdocs.io/#q=js date.
DevDocs supports OpenSearch, meaning it can easily be installed as a search engine on most web browsers.

Keyboard Shortcuts

Sidebar

Move selection
Show/hide sub-list
enter
Open selection
#{ctrlKey} + enter
Open selection in a new tab
alt + r
Reveal current page in sidebar

Browsing

#{navKey} + ← #{navKey} + →
Go back/forward
alt + ↓ alt + ↑
shift + ↓ shift + ↑
Scroll step by step

space shift + space
Scroll screen by screen
#{ctrlKey} + ↑ #{ctrlKey} + ↓
Scroll to the top/bottom
alt + f
Focus first link in the content area
(press tab to focus the other links)

App

ctrl + ,
Open preferences
escape
Reset UI
?
Show this page

Miscellaneous

alt + o
Open original page
alt + g
Search on Google
alt + s
Search on Stack Overflow

Tip: If the cursor is no longer in the search field, press / or continue to type and it will refocus the search field and start showing new results.

Abbreviations

Feel free to suggest new abbreviations on GitHub.
Word Alias #{("
#{key}#{value}" for key, value of app.models.Entry.ALIASES).join('')}
"""