'use strict'; const BaseSection = require(__dirname + '/base-section.js'); class ShortcutsSection extends BaseSection { constructor(props) { super(); this.props = props; } templateMac() { const userOSKey = '⌘'; return `
Application Shortcuts
${userOSKey}, Settings
${userOSKey}K Keyboard Shortcuts
Shift${userOSKey}D Reset App Settings
${userOSKey}L Log Out
${userOSKey}H Hide Zulip
Option${userOSKey}H Hide Others
${userOSKey}Q Quit Zulip
Edit Shortcuts
${userOSKey}Z Undo
Shift${userOSKey}Z Redo
${userOSKey}X Cut
${userOSKey}C Copy
${userOSKey}V Paste
Shift${userOSKey}V Paste and Match Style
${userOSKey}A Select All
${userOSKey}F Find
${userOSKey}G Find Next
Control${userOSKey}Space Emoji & Symbols
View Shortcuts
${userOSKey}R Reload
Shift${userOSKey}R Hard Reload
Control${userOSKey}F Enter Full Screen
${userOSKey}= Zoom In
${userOSKey}- Zoom Out
${userOSKey}0 Actual Size
${userOSKey}S Toggle Sidebar
Option${userOSKey}I Toggle DevTools for Zulip App
Option${userOSKey}U Toggle DevTools for Active Tab
History Shortcuts
${userOSKey} Back
${userOSKey} Forward
Window Shortcuts
${userOSKey}M Minimize
${userOSKey}W Close
`; } templateWinLin() { const userOSKey = 'Ctrl'; return `
Application Shortcuts
${userOSKey} + , Settings
${userOSKey} + K Keyboard Shortcuts
${userOSKey} + L Log Out
${userOSKey} + Q Quit Zulip
Edit Shortcuts
${userOSKey} + Z Undo
${userOSKey} + Y Redo
${userOSKey} + X Cut
${userOSKey} + C Copy
${userOSKey} + V Paste
${userOSKey} + Shift + V Paste and Match Style
${userOSKey} + A Select All
View Shortcuts
${userOSKey} + R Reload
${userOSKey} + Shift + R Hard Reload
F11 Toggle Full Screen
${userOSKey} + = Zoom In
${userOSKey} + - Zoom Out
${userOSKey} + 0 Actual Size
${userOSKey} + S Toggle Sidebar
${userOSKey} + Shift + I Toggle DevTools for Zulip App
${userOSKey} + Shift + U Toggle DevTools for Active Tab
History Shortcuts
Alt + Back
Alt + Forward
Window Shortcuts
${userOSKey} + M Minimize
${userOSKey} + W Close
`; } init() { this.props.$root.innerHTML = (process.platform === 'darwin') ? this.templateMac() : this.templateWinLin(); } } module.exports = ShortcutsSection;