Add shortcut
This commit is contained in:
@ -69,7 +69,12 @@ type Props = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keydown('shift+/')
|
@keydown('shift+/')
|
||||||
goToOpenKeyboardShortcuts() {
|
openKeyboardShortcuts() {
|
||||||
|
this.props.ui.setActiveModal('keyboard-shortcuts');
|
||||||
|
}
|
||||||
|
|
||||||
|
@keydown('shift+3')
|
||||||
|
openMarkdownShortcuts() {
|
||||||
this.props.ui.setActiveModal('markdown-shortcuts');
|
this.props.ui.setActiveModal('markdown-shortcuts');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ import Settings from 'scenes/Settings';
|
|||||||
<Modal name="keyboard-shortcuts" title="Keyboard shortcuts">
|
<Modal name="keyboard-shortcuts" title="Keyboard shortcuts">
|
||||||
<KeyboardShortcuts />
|
<KeyboardShortcuts />
|
||||||
</Modal>
|
</Modal>
|
||||||
<Modal name="markdown-shortcuts" title="Markdown shortcuts">
|
<Modal name="markdown-shortcuts" title="Markdown formatting">
|
||||||
<MarkdownShortcuts />
|
<MarkdownShortcuts />
|
||||||
</Modal>
|
</Modal>
|
||||||
<Modal name="settings" title="Settings">
|
<Modal name="settings" title="Settings">
|
||||||
|
@ -18,7 +18,7 @@ type Props = {
|
|||||||
const Modal = ({
|
const Modal = ({
|
||||||
children,
|
children,
|
||||||
isOpen,
|
isOpen,
|
||||||
title = 'Untitled Modal',
|
title = 'Untitled',
|
||||||
onRequestClose,
|
onRequestClose,
|
||||||
...rest
|
...rest
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
|
@ -36,6 +36,9 @@ function KeyboardShortcuts() {
|
|||||||
|
|
||||||
<Keys><Key>?</Key></Keys>
|
<Keys><Key>?</Key></Keys>
|
||||||
<Label>Open this guide</Label>
|
<Label>Open this guide</Label>
|
||||||
|
|
||||||
|
<Keys><Key>#</Key></Keys>
|
||||||
|
<Label>Open markdown guide</Label>
|
||||||
</List>
|
</List>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user