Document keyboard shortcuts (#7908)

This commit is contained in:
Šimon Brandner 2022-03-04 13:14:52 +01:00 committed by GitHub
parent 84bd136657
commit a58b1e9d79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 91 additions and 19 deletions

View file

@ -26,13 +26,13 @@ import {
import {
CATEGORIES,
CategoryName,
getCustomizableShortcuts,
getKeyboardShortcuts,
KeyBindingAction,
} from "./accessibility/KeyboardShortcuts";
export const getBindingsByCategory = (category: CategoryName): KeyBinding[] => {
return CATEGORIES[category].settingNames.reduce((bindings, name) => {
const value = getCustomizableShortcuts()[name]?.default;
const value = getKeyboardShortcuts()[name]?.default;
if (value) {
bindings.push({
action: name as KeyBindingAction,