diff --git a/frontend_tests/node_tests/common.js b/frontend_tests/node_tests/common.js index 02ba05a7f7..ab992e5d58 100644 --- a/frontend_tests/node_tests/common.js +++ b/frontend_tests/node_tests/common.js @@ -100,6 +100,7 @@ run_test("adjust_mac_shortcuts mac non-defaults", ({override}) => { ["PgUp", "↑"], ["PgDn", "↓"], ["Ctrl", "⌘"], + ["Alt", "⌘"], ["X + Shift", "X + Shift"], ["⌘ + Return", "⌘ + Return"], ["Enter or Backspace", "Enter or Backspace"], @@ -157,6 +158,7 @@ run_test("adjust_mac_shortcuts mac defaults", ({override}) => { ["PgUp", "↑"], ["PgDn", "↓"], ["Ctrl", "⌘"], + ["Alt", "⌘"], ["[", "["], ["X", "X"], ]); diff --git a/static/js/common.ts b/static/js/common.ts index 8ba64886b0..a3b4b34db8 100644 --- a/static/js/common.ts +++ b/static/js/common.ts @@ -61,6 +61,7 @@ export function adjust_mac_shortcuts(key_elem_class: string, kbd_elem = true): v ["PgUp", "↑"], ["PgDn", "↓"], ["Ctrl", "⌘"], + ["Alt", "⌘"], ]); const fn_shortcuts = new Set(["Home", "End", "PgUp", "PgDn"]); diff --git a/static/templates/keyboard_shortcuts.hbs b/static/templates/keyboard_shortcuts.hbs index 1c12822e75..619d979e0e 100644 --- a/static/templates/keyboard_shortcuts.hbs +++ b/static/templates/keyboard_shortcuts.hbs @@ -101,6 +101,14 @@ {{t 'First message' }} Home + + {{t 'Go back through viewing history' }} + Alt + + + + {{t 'Go forward through viewing history' }} + Alt + +
diff --git a/templates/zerver/help/keyboard-shortcuts.md b/templates/zerver/help/keyboard-shortcuts.md index 53d343247a..ed29eb54a7 100644 --- a/templates/zerver/help/keyboard-shortcuts.md +++ b/templates/zerver/help/keyboard-shortcuts.md @@ -67,6 +67,10 @@ below, and add more to your repertoire as needed. * **Scroll down**: `PgDn`, `J`, or `Spacebar` +* **Go back through viewing history**: `Alt` + `←` + +* **Go forward through viewing history**: `Alt` + `→` + ## Narrowing * **Narrow to next unread topic**: `n`