Overview

The Shortcuts extension handles some miscellaneous keyboard shortcuts.

KeysDescription
Ctrl+CCopy the current line if the selection is collapsed
Ctrl+XCut 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 } );
JavaScript

or import the file:

<script src="path-to-the-file/shortcuts.min.js"></script>
HTML

Options

Setting false to shortcuts disables the extension.

new RyuseiCode( { shortcuts: false } );
JavaScript