2017-07-11 17:37:43 +02:00
|
|
|
import React from 'react';
|
2020-07-06 11:36:45 +02:00
|
|
|
import { useTranslation } from 'react-i18next';
|
2019-01-16 23:56:18 +01:00
|
|
|
import { metaKeyName, } from '../../../utils/metaKey';
|
2017-06-06 21:20:21 +02:00
|
|
|
|
2017-07-11 17:37:43 +02:00
|
|
|
function KeyboardShortcutModal() {
|
2020-07-06 11:36:45 +02:00
|
|
|
const { t } = useTranslation();
|
2017-07-11 17:37:43 +02:00
|
|
|
return (
|
2020-05-26 23:48:47 +02:00
|
|
|
<div className="keyboard-shortcuts">
|
2020-07-06 11:36:45 +02:00
|
|
|
<h3 className="keyboard-shortcuts__title">{t('CodeEditing')}</h3>
|
2020-05-28 22:44:00 +02:00
|
|
|
<p className="keyboard-shortcuts__description">
|
2020-07-06 11:36:45 +02: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 22:44:00 +02:00
|
|
|
</p>
|
|
|
|
<ul className="keyboard-shortcuts__list">
|
2020-05-26 23:48:47 +02:00
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">{'\u21E7'} + Tab</span>
|
2020-07-06 11:36:45 +02:00
|
|
|
<span>{t('Tidy')}</span>
|
2020-05-26 23:48:47 +02:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + F
|
|
|
|
</span>
|
2020-07-06 11:36:45 +02:00
|
|
|
<span>{t('FindText')}</span>
|
2020-05-26 23:48:47 +02:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + G
|
|
|
|
</span>
|
2020-07-06 11:36:45 +02:00
|
|
|
<span>{t('FindNextTextMatch')}</span>
|
2020-05-26 23:48:47 +02:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + {'\u21E7'} + G
|
|
|
|
</span>
|
2020-07-06 11:36:45 +02:00
|
|
|
<span>{t('FindPreviousTextMatch')}</span>
|
2020-05-26 23:48:47 +02:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + [
|
|
|
|
</span>
|
2020-07-06 11:36:45 +02:00
|
|
|
<span>{t('IndentCodeLeft')}</span>
|
2020-05-26 23:48:47 +02:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + ]
|
|
|
|
</span>
|
2020-07-06 11:36:45 +02:00
|
|
|
<span>{t('IndentCodeRight')}</span>
|
2020-05-26 23:48:47 +02:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + /
|
|
|
|
</span>
|
2020-07-06 11:36:45 +02:00
|
|
|
<span>{t('CommentLine')}</span>
|
2020-05-26 23:48:47 +02:00
|
|
|
</li>
|
2020-05-28 22:44:00 +02: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 11:36:45 +02:00
|
|
|
<span>{t('Save')}</span>
|
2020-05-28 22:44:00 +02:00
|
|
|
</li>
|
2020-05-26 23:48:47 +02:00
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + Enter
|
|
|
|
</span>
|
2020-07-06 11:36:45 +02:00
|
|
|
<span>{t('StartSketch')}</span>
|
2020-05-26 23:48:47 +02:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + {'\u21E7'} + Enter
|
|
|
|
</span>
|
2020-07-06 11:36:45 +02:00
|
|
|
<span>{t('StopSketch')}</span>
|
2020-05-26 23:48:47 +02:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + {'\u21E7'} + 1
|
|
|
|
</span>
|
2020-07-06 11:36:45 +02:00
|
|
|
<span>{t('TurnOnAccessibleOutput')}</span>
|
2020-05-26 23:48:47 +02:00
|
|
|
</li>
|
|
|
|
<li className="keyboard-shortcut-item">
|
|
|
|
<span className="keyboard-shortcut__command">
|
|
|
|
{metaKeyName} + {'\u21E7'} + 2
|
|
|
|
</span>
|
2020-07-06 11:36:45 +02:00
|
|
|
<span>{t('TurnOffAccessibleOutput')}</span>
|
2020-05-26 23:48:47 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2017-07-11 17:37:43 +02:00
|
|
|
);
|
2016-09-07 23:47:22 +02:00
|
|
|
}
|
|
|
|
|
2020-05-28 22:44:00 +02:00
|
|
|
export default KeyboardShortcutModal;
|