mirror of
https://github.com/heyman/heynote.git
synced 2024-10-07 02:22:41 +02:00
Use explicit key bindings for copy/paste/cut, instead of just relying on default browser keys
This commit is contained in:
parent
a5088a48af
commit
f9673b0954
@ -16,6 +16,7 @@ import {
|
|||||||
selectNextParagraph, selectPreviousParagraph,
|
selectNextParagraph, selectPreviousParagraph,
|
||||||
newCursorBelow, newCursorAbove,
|
newCursorBelow, newCursorAbove,
|
||||||
} from "./block/commands.js"
|
} from "./block/commands.js"
|
||||||
|
import { pasteCommand, copyCommand, cutCommand } from "./copy-paste.js"
|
||||||
|
|
||||||
import { formatBlockContent } from "./block/format-code.js"
|
import { formatBlockContent } from "./block/format-code.js"
|
||||||
|
|
||||||
@ -41,6 +42,9 @@ export function keymapFromSpec(specs) {
|
|||||||
|
|
||||||
export function heynoteKeymap(editor) {
|
export function heynoteKeymap(editor) {
|
||||||
return keymapFromSpec([
|
return keymapFromSpec([
|
||||||
|
["Mod-c", copyCommand(editor)],
|
||||||
|
["Mod-v", pasteCommand],
|
||||||
|
["Mod-x", cutCommand(editor)],
|
||||||
["Tab", indentMore],
|
["Tab", indentMore],
|
||||||
["Shift-Tab", indentLess],
|
["Shift-Tab", indentLess],
|
||||||
["Alt-Shift-Enter", addNewBlockBeforeFirst],
|
["Alt-Shift-Enter", addNewBlockBeforeFirst],
|
||||||
|
Loading…
Reference in New Issue
Block a user