2017-07-12 05:42:30 +00:00
|
|
|
|
// @flow
|
2018-05-05 23:16:08 +00:00
|
|
|
|
import * as React from 'react';
|
2017-09-29 05:49:31 +00:00
|
|
|
|
import styled from 'styled-components';
|
2017-09-29 06:18:15 +00:00
|
|
|
|
import Key from 'components/Key';
|
2017-10-29 22:02:24 +00:00
|
|
|
|
import Flex from 'shared/components/Flex';
|
2017-07-12 05:42:30 +00:00
|
|
|
|
import HelpText from 'components/HelpText';
|
2019-03-10 04:00:45 +00:00
|
|
|
|
import { meta } from 'utils/keyboard';
|
2017-07-12 05:42:30 +00:00
|
|
|
|
|
|
|
|
|
function KeyboardShortcuts() {
|
|
|
|
|
return (
|
|
|
|
|
<Flex column>
|
|
|
|
|
<HelpText>
|
2019-08-09 04:13:58 +00:00
|
|
|
|
Outline is designed to be fast and easy to use. All of your usual
|
|
|
|
|
keyboard shortcuts work here, and there’s Markdown too.
|
2017-07-12 05:42:30 +00:00
|
|
|
|
</HelpText>
|
2017-09-29 05:49:31 +00:00
|
|
|
|
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<h2>Navigation</h2>
|
|
|
|
|
<List>
|
2019-03-10 04:00:45 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>n</Key>
|
|
|
|
|
</Keys>
|
|
|
|
|
<Label>New document in current collection</Label>
|
|
|
|
|
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>e</Key>
|
|
|
|
|
</Keys>
|
2017-09-29 05:49:31 +00:00
|
|
|
|
<Label>Edit current document</Label>
|
|
|
|
|
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>m</Key>
|
|
|
|
|
</Keys>
|
2017-09-29 05:49:31 +00:00
|
|
|
|
<Label>Move current document</Label>
|
|
|
|
|
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>/</Key> or <Key>t</Key>
|
|
|
|
|
</Keys>
|
2017-09-29 05:49:31 +00:00
|
|
|
|
<Label>Jump to search</Label>
|
|
|
|
|
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>d</Key>
|
|
|
|
|
</Keys>
|
2017-09-29 05:49:31 +00:00
|
|
|
|
<Label>Jump to dashboard</Label>
|
|
|
|
|
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
2018-01-29 01:57:45 +00:00
|
|
|
|
<Key>?</Key>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
</Keys>
|
2017-09-29 05:49:31 +00:00
|
|
|
|
<Label>Open this guide</Label>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
</List>
|
|
|
|
|
|
|
|
|
|
<h2>Editor</h2>
|
|
|
|
|
<List>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
2019-03-10 04:00:45 +00:00
|
|
|
|
<Key>{meta}</Key> + <Key>Enter</Key>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Save and exit document edit mode</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
2019-10-28 05:07:01 +00:00
|
|
|
|
<Key>{meta}</Key> + <Key>Shift</Key> + <Key>p</Key>
|
|
|
|
|
</Keys>
|
|
|
|
|
<Label>Publish and exit document edit mode</Label>
|
|
|
|
|
<Keys>
|
|
|
|
|
<Key>{meta}</Key> + <Key>s</Key>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Save document and continue editing</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
2019-03-10 04:00:45 +00:00
|
|
|
|
<Key>{meta}</Key> + <Key>Esc</Key>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Cancel editing</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
2019-03-10 04:00:45 +00:00
|
|
|
|
<Key>{meta}</Key> + <Key>b</Key>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Bold</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
2019-03-10 04:00:45 +00:00
|
|
|
|
<Key>{meta}</Key> + <Key>i</Key>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Italic</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
2019-03-10 04:00:45 +00:00
|
|
|
|
<Key>{meta}</Key> + <Key>u</Key>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Underline</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
2019-03-10 04:00:45 +00:00
|
|
|
|
<Key>{meta}</Key> + <Key>d</Key>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
</Keys>
|
2017-10-01 03:53:17 +00:00
|
|
|
|
<Label>Strikethrough</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
2019-03-10 04:00:45 +00:00
|
|
|
|
<Key>{meta}</Key> + <Key>k</Key>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
</Keys>
|
2017-10-01 03:53:17 +00:00
|
|
|
|
<Label>Link</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
2019-03-10 04:00:45 +00:00
|
|
|
|
<Key>{meta}</Key> + <Key>z</Key>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Undo</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
2019-03-10 04:00:45 +00:00
|
|
|
|
<Key>{meta}</Key> + <Key>Shift</Key> + <Key>z</Key>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Redo</Label>
|
|
|
|
|
</List>
|
|
|
|
|
|
|
|
|
|
<h2>Markdown</h2>
|
|
|
|
|
<List>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>#</Key> <Key>Space</Key>
|
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Large header</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>##</Key> <Key>Space</Key>
|
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Medium header</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>###</Key> <Key>Space</Key>
|
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Small header</Label>
|
|
|
|
|
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>1.</Key> <Key>Space</Key>
|
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Numbered list</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>-</Key> <Key>Space</Key>
|
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Bulleted list</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>[ ]</Key> <Key>Space</Key>
|
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Todo list</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>></Key> <Key>Space</Key>
|
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Blockquote</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>---</Key>
|
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Horizontal divider</Label>
|
2017-11-10 22:14:30 +00:00
|
|
|
|
<Keys>
|
|
|
|
|
<Key>{'```'}</Key>
|
|
|
|
|
</Keys>
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Label>Code block</Label>
|
2017-09-29 06:22:09 +00:00
|
|
|
|
|
2017-10-01 02:59:08 +00:00
|
|
|
|
<Keys>_italic_</Keys>
|
|
|
|
|
<Label>Italic</Label>
|
|
|
|
|
<Keys>**bold**</Keys>
|
|
|
|
|
<Label>Bold</Label>
|
|
|
|
|
<Keys>~~strikethrough~~</Keys>
|
|
|
|
|
<Label>Strikethrough</Label>
|
|
|
|
|
<Keys>{'`code`'}</Keys>
|
|
|
|
|
<Label>Inline code</Label>
|
2017-09-29 05:49:31 +00:00
|
|
|
|
</List>
|
2017-07-12 05:42:30 +00:00
|
|
|
|
</Flex>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-29 05:49:31 +00:00
|
|
|
|
const List = styled.dl`
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
padding: 0;
|
2017-11-10 22:14:30 +00:00
|
|
|
|
margin: 0;
|
2017-09-29 05:49:31 +00:00
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const Keys = styled.dt`
|
|
|
|
|
float: left;
|
|
|
|
|
width: 25%;
|
2018-11-15 08:28:59 +00:00
|
|
|
|
height: 30px;
|
2017-11-10 22:14:30 +00:00
|
|
|
|
margin: 0;
|
2017-09-29 05:49:31 +00:00
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const Label = styled.dd`
|
|
|
|
|
float: left;
|
|
|
|
|
width: 75%;
|
2018-11-15 08:28:59 +00:00
|
|
|
|
height: 30px;
|
2017-11-10 22:14:30 +00:00
|
|
|
|
margin: 0;
|
2018-11-15 08:28:59 +00:00
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2017-09-29 05:49:31 +00:00
|
|
|
|
`;
|
|
|
|
|
|
2017-07-12 05:42:30 +00:00
|
|
|
|
export default KeyboardShortcuts;
|