Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/shortcuts3
Conflicts: src/components/structures/LoggedInView.js
This commit is contained in:
@@ -87,12 +87,6 @@ const shortcuts: Record<Categories, IShortcut[]> = {
|
||||
key: Key.GREATER_THAN,
|
||||
}],
|
||||
description: _td("Toggle Quote"),
|
||||
}, {
|
||||
keybinds: [{
|
||||
modifiers: [CMD_OR_CTRL],
|
||||
key: Key.M,
|
||||
}],
|
||||
description: _td("Toggle Markdown"),
|
||||
}, {
|
||||
keybinds: [{
|
||||
modifiers: [Modifiers.SHIFT],
|
||||
@@ -115,6 +109,15 @@ const shortcuts: Record<Categories, IShortcut[]> = {
|
||||
key: Key.END,
|
||||
}],
|
||||
description: _td("Jump to start/end of the composer"),
|
||||
}, {
|
||||
keybinds: [{
|
||||
modifiers: [Modifiers.CONTROL, Modifiers.ALT],
|
||||
key: Key.ARROW_UP,
|
||||
}, {
|
||||
modifiers: [Modifiers.CONTROL, Modifiers.ALT],
|
||||
key: Key.ARROW_DOWN,
|
||||
}],
|
||||
description: _td("Navigate composer history"),
|
||||
},
|
||||
],
|
||||
|
||||
@@ -179,6 +182,24 @@ const shortcuts: Record<Categories, IShortcut[]> = {
|
||||
key: Key.PAGE_DOWN,
|
||||
}],
|
||||
description: _td("Scroll up/down in the timeline"),
|
||||
}, {
|
||||
keybinds: [{
|
||||
modifiers: [Modifiers.ALT, Modifiers.SHIFT],
|
||||
key: Key.ARROW_UP,
|
||||
}, {
|
||||
modifiers: [Modifiers.ALT, Modifiers.SHIFT],
|
||||
key: Key.ARROW_DOWN,
|
||||
}],
|
||||
description: _td("Previous/next unread room or DM"),
|
||||
}, {
|
||||
keybinds: [{
|
||||
modifiers: [Modifiers.ALT],
|
||||
key: Key.ARROW_UP,
|
||||
}, {
|
||||
modifiers: [Modifiers.ALT],
|
||||
key: Key.ARROW_DOWN,
|
||||
}],
|
||||
description: _td("Previous/next room or DM"),
|
||||
}, {
|
||||
keybinds: [{
|
||||
modifiers: [CMD_OR_CTRL],
|
||||
@@ -229,6 +250,14 @@ const shortcuts: Record<Categories, IShortcut[]> = {
|
||||
],
|
||||
};
|
||||
|
||||
const categoryOrder = [
|
||||
Categories.COMPOSER,
|
||||
Categories.CALLS,
|
||||
Categories.ROOM_LIST,
|
||||
Categories.AUTOCOMPLETE,
|
||||
Categories.NAVIGATION,
|
||||
];
|
||||
|
||||
interface IModal {
|
||||
close: () => void;
|
||||
finished: Promise<any[]>;
|
||||
@@ -295,7 +324,8 @@ export const toggleDialog = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const sections = Object.entries(shortcuts).map(([category, list]) => {
|
||||
const sections = categoryOrder.map(category => {
|
||||
const list = shortcuts[category];
|
||||
return <div className="mx_KeyboardShortcutsDialog_category" key={category}>
|
||||
<h3>{_t(category)}</h3>
|
||||
<div>{list.map(shortcut => <Shortcut key={shortcut.description} shortcut={shortcut} />)}</div>
|
||||
|
||||
Reference in New Issue
Block a user