Overview
The Shortcuts extension handles some miscellaneous keyboard shortcuts.
Keys | Description |
---|---|
Ctrl+C | Copy the current line if the selection is collapsed |
Ctrl+X | Cut the current line if the selection is collapsed |
Ctrl+↑ | Scroll up |
Ctrl+↓ | Scroll down |
Without this extension, users can still copy and cut selected texts as usual.
Usage
Register the Shortcuts extension:
import { RyuseiCode, Shortcuts } from '@ryusei/code'; RyuseiCode.compose( { Shortcuts } );
or import the file:
<script src="path-to-the-file/shortcuts.min.js"></script>
Options
Setting false
to shortcuts
disables the extension.
new RyuseiCode( { shortcuts: false } );