2017-07-11 15:37:43 +00:00
|
|
|
import React from 'react';
|
2020-07-06 09:36:45 +00:00
|
|
|
import { useTranslation } from 'react-i18next';
|
2019-01-16 22:56:18 +00:00
|
|
|
import { metaKeyName, } from '../../../utils/metaKey';
|
2017-06-06 19:20:21 +00:00
|
|
|
|
2017-07-11 15:37:43 +00:00
|
|
|
function KeyboardShortcutModal() {
|
2020-07-06 09:36:45 +00:00
|
|
|
const { t } = useTranslation();
|
2017-07-11 15:37:43 +00:00
|
|
|
return (
|
2020-05-26 21:48:47 +00:00
|
|
|
<div className="keyboard-shortcuts">
|
2020-07-06 09:36:45 +00:00
|
|
|
<h3 className="keyboard-shortcuts__title">{t('CodeEditing')}</h3>
|
2020-05-28 20:44:00 +00:00
|
|
|
<p className="keyboard-shortcuts__description">
|
2020-07-06 09:36:45 +00:00
|
|
|
{t('Code editing keyboard shortcuts follow')} <a href="https://shortcuts.design/toolspage-sublimetext.html" target="_blank" rel="noopener noreferrer">{t('Sublime Text shortcuts')}</a>.
|
2020-05-28 20:44:00 +00:00
|
|
|
</p>
|
|
|
|
<ul className="keyboard-shortcuts__list">
|
2020-05-26 21:48:47 +00:00
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">{'\u21E7'} + Tab</span>
|
2020-07-06 09:36:45 +00:00
|
|
|
<span>{t('Tidy')}</span>
|
2020-05-26 21:48:47 +00:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + F
|
|
|
|
</span>
|
2020-07-06 09:36:45 +00:00
|
|
|
<span>{t('FindText')}</span>
|
2020-05-26 21:48:47 +00:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + G
|
|
|
|
</span>
|
2020-07-06 09:36:45 +00:00
|
|
|
<span>{t('FindNextTextMatch')}</span>
|
2020-05-26 21:48:47 +00:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + {'\u21E7'} + G
|
|
|
|
</span>
|
2020-07-06 09:36:45 +00:00
|
|
|
<span>{t('FindPreviousTextMatch')}</span>
|
2020-05-26 21:48:47 +00:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + [
|
|
|
|
</span>
|
2020-07-06 09:36:45 +00:00
|
|
|
<span>{t('IndentCodeLeft')}</span>
|
2020-05-26 21:48:47 +00:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + ]
|
|
|
|
</span>
|
2020-07-06 09:36:45 +00:00
|
|
|
<span>{t('IndentCodeRight')}</span>
|
2020-05-26 21:48:47 +00:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + /
|
|
|
|
</span>
|
2020-07-06 09:36:45 +00:00
|
|
|
<span>{t('CommentLine')}</span>
|
2020-05-26 21:48:47 +00:00
|
|
|
</li>
|
2020-05-28 20:44:00 +00:00
|
|
|
</ul>
|
|
|
|
<h3 className="keyboard-shortcuts__title">General</h3>
|
|
|
|
<ul className="keyboard-shortcuts__list">
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + S
|
|
|
|
</span>
|
2020-07-06 09:36:45 +00:00
|
|
|
<span>{t('Save')}</span>
|
2020-05-28 20:44:00 +00:00
|
|
|
</li>
|
2020-05-26 21:48:47 +00:00
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + Enter
|
|
|
|
</span>
|
2020-07-06 09:36:45 +00:00
|
|
|
<span>{t('StartSketch')}</span>
|
2020-05-26 21:48:47 +00:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + {'\u21E7'} + Enter
|
|
|
|
</span>
|
2020-07-06 09:36:45 +00:00
|
|
|
<span>{t('StopSketch')}</span>
|
2020-05-26 21:48:47 +00:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + {'\u21E7'} + 1
|
|
|
|
</span>
|
2020-07-06 09:36:45 +00:00
|
|
|
<span>{t('TurnOnAccessibleOutput')}</span>
|
2020-05-26 21:48:47 +00:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + {'\u21E7'} + 2
|
|
|
|
</span>
|
2020-07-06 09:36:45 +00:00
|
|
|
<span>{t('TurnOffAccessibleOutput')}</span>
|
2020-05-26 21:48:47 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2017-07-11 15:37:43 +00:00
|
|
|
);
|
2016-09-07 21:47:22 +00:00
|
|
|
}
|
|
|
|
|
2020-05-28 20:44:00 +00:00
|
|
|
export default KeyboardShortcutModal;
|