Add a keyboard shortcut to toggle hidden event visibility when labs are enabled. (#7584)

Notes: The keyboard shortcut is control (or cmd) shift h.
Signed-off-by: Katarzyna Stachura <uwunyaa@outlook.com>
This commit is contained in:
UwUnyaa 2022-01-26 17:50:47 +01:00 committed by GitHub
parent 00912c0b50
commit debf4caade
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 82 additions and 3 deletions

View file

@ -31,6 +31,7 @@ export enum CategoryName {
ROOM_LIST = "Room List",
ROOM = "Room",
AUTOCOMPLETE = "Autocomplete",
LABS = "Labs",
}
// Meta-key representing the digits [0-9] often found at the top of standard keyboard layouts
@ -125,6 +126,11 @@ export const CATEGORIES: Record<CategoryName, ICategory> = {
"KeyBinding.nextOptionInAutoComplete",
"KeyBinding.previousOptionInAutoComplete",
],
}, [CategoryName.LABS]: {
categoryLabel: _td("Labs"),
settingNames: [
"KeyBinding.toggleHiddenEventVisibility",
],
},
};
@ -403,6 +409,14 @@ export const KEYBOARD_SHORTCUTS: { [setting: string]: ISetting } = {
},
displayName: _td("Toggle space panel"),
},
"KeyBinding.toggleHiddenEventVisibility": {
default: {
ctrlOrCmdKey: true,
shiftKey: true,
key: Key.H,
},
displayName: _td("Toggle hidden event visibility"),
},
};
export const registerShortcut = (shortcutName: string, categoryName: CategoryName, shortcut: ISetting): void => {