Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit c7fcf2a

Browse files
committed
Fix broken "Go to Home View" shortcut on macOS
The previous shortcut CMD+OPT+H is already bound by the system (hide other windows) and cannot be overridden. This commit changes the shortcut to CTRL+SHIFT+H on macOS while keeping CTRL+ALT+H on other platforms. Note that both CTRL+OPT+H (hide cursor) and CTRL+H (delete previous character) are bound by the system as well and wouldn't have worked as a replacement. Fixes: element-hq/element-web#16692 Signed-off-by: Johannes Marbach <[email protected]>
1 parent b089f3d commit c7fcf2a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/KeyBindingsDefaults.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,11 @@ const navigationBindings = (): KeyBinding<NavigationAction>[] => {
360360
action: NavigationAction.GoToHome,
361361
keyCombo: {
362362
key: Key.H,
363-
ctrlOrCmd: true,
364-
altKey: true,
363+
ctrlKey: true,
364+
altKey: !isMac,
365+
shiftKey: isMac,
365366
},
366367
},
367-
368368
{
369369
action: NavigationAction.SelectPrevRoom,
370370
keyCombo: {

src/accessibility/KeyboardShortcuts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ const shortcuts: Record<Categories, IShortcut[]> = {
265265
description: _td("Toggle this dialog"),
266266
}, {
267267
keybinds: [{
268-
modifiers: [CMD_OR_CTRL, Modifiers.ALT],
268+
modifiers: [Modifiers.CONTROL, isMac ? Modifiers.SHIFT : Modifiers.ALT],
269269
key: Key.H,
270270
}],
271271
description: _td("Go to Home View"),

0 commit comments

Comments
 (0)