mirror of
https://github.com/heyman/heynote.git
synced 2025-02-16 10:19:55 +01: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,
|
||||
newCursorBelow, newCursorAbove,
|
||||
} from "./block/commands.js"
|
||||
import { pasteCommand, copyCommand, cutCommand } from "./copy-paste.js"
|
||||
|
||||
import { formatBlockContent } from "./block/format-code.js"
|
||||
|
||||
@ -41,6 +42,9 @@ export function keymapFromSpec(specs) {
|
||||
|
||||
export function heynoteKeymap(editor) {
|
||||
return keymapFromSpec([
|
||||
["Mod-c", copyCommand(editor)],
|
||||
["Mod-v", pasteCommand],
|
||||
["Mod-x", cutCommand(editor)],
|
||||
["Tab", indentMore],
|
||||
["Shift-Tab", indentLess],
|
||||
["Alt-Shift-Enter", addNewBlockBeforeFirst],
|
||||
|
Loading…
Reference in New Issue
Block a user