This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/app/scenes/KeyboardShortcuts.js

175 lines
4.0 KiB
JavaScript
Raw Normal View History

// @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';
import Flex from 'shared/components/Flex';
import HelpText from 'components/HelpText';
import { meta } from 'utils/keyboard';
function KeyboardShortcuts() {
return (
<Flex column>
<HelpText>
Outline is designed to be fast and easy to use. All of your usual
keyboard shortcuts work here, and theres Markdown too.
</HelpText>
2017-09-29 05:49:31 +00:00
2017-10-01 02:59:08 +00:00
<h2>Navigation</h2>
<List>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>&gt;</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>
</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%;
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%;
height: 30px;
2017-11-10 22:14:30 +00:00
margin: 0;
display: flex;
align-items: center;
2017-09-29 05:49:31 +00:00
`;
export default KeyboardShortcuts;