diff --git a/packages/annotator/src/lib/Keys.ts b/packages/annotator/src/lib/Keys.ts index d9a4d1a78..a38f3a762 100644 --- a/packages/annotator/src/lib/Keys.ts +++ b/packages/annotator/src/lib/Keys.ts @@ -501,11 +501,9 @@ export default class Keys { if (e.ctrlKey || e.metaKey) { if (e.key === "c") { this.annotator.onCopyText(); - } - if (e.key === "v") { + } else if (e.key === "v") { this.annotator.onPasteText(); - } - if (e.key === "x") { + } else if (e.key === "x") { if (this.text.mode === EditMode.RAW) { this.annotator.onCopyText(); const area = this.cursor.getSelectedArea(); @@ -518,6 +516,17 @@ export default class Keys { ); } } + } else if (e.key === "a") { + this.cursor.selectStart = { + yLine: 0, + xLine: 0, + } + + const lastSegment = this.text.segments[this.text.segments.length - 1]; + this.cursor.selectEnd = { + xLine: lastSegment.lines[lastSegment.lines.length - 1].length, + yLine: lastSegment.lineEnd + } } break; }