For these modals, we use Code Mirror, a code editor library. This library contains a large range of shortcuts available on both PC and MAC.
If you want to, please go to the exhaustive list, if you're interested in the ones implemented on AB Tasty, here is the list: defaultTab, delCharAfter, delCharBefore, deleteLine, delGroupAfter, delGroupBefore, delLineLeft, delWordAfter, delWordBefore, delWrappedLineLeft, delWrappedLineRight, find, findNext, findPrev, goCharLeft, goCharRight, goDocEnd, goDocStart, goGroupLeft, goGroupRight, goLineDown, goLineEnd, goLineLeft, goLineRight, goLineStart, goLineUp, goPageDown, goPageUp, goWordLeft, goWordRight, indentAuto, indentLess, indentMore, insert, insertSoft, killLine, newlineAndIndent, redo, redoSelection, replace, replaceAll, selectAll, transposeChars, undo, undoSelection...
Select the whole content of the editor.
Ctrl-A (PC), Cmd-A (Mac)
Insert a newline and auto-indent the new line.
Ctrl-F (PC), Cmd-F (Mac)
Ctrl-G (PC), Cmd-G (Mac)
Shift-Ctrl-G (PC), Shift-Cmd-G (Mac)
Shift-Ctrl-F (PC), Cmd-Alt-F (Mac)
Shift-Ctrl-R (PC), Shift-Cmd-Alt-F (Mac)
Undo the last change. Note that, because browsers still don't make it possible for scripts to react to or customize the context menu, selecting undo (or redo) from the context menu in a CodeMirror instance does not work.
Ctrl-Z (PC), Cmd-Z (Mac)
Redo the last undone change.
Ctrl-Y (PC), Shift-Cmd-Z (Mac), Cmd-Y (Mac)
Undo the last change to the selection, or if there are no selection-only changes at the top of the history, undo the last change.
Ctrl-U (PC), Cmd-U (Mac)
Redo the last change to the selection, or the last text change if no selection changes remain.
Alt-U (PC), Shift-Cmd-U (Mac)
Emacs-style line killing. Deletes the part of the line after the cursor. If that consists only of whitespace, the newline at the end of the line is also deleted.
Deletes the whole line under the cursor, including newline at the end.
Ctrl-D (PC), Cmd-D (Mac)
Delete the part of the line before the cursor.
Ctrl-D (PC), Cmd-D (Mac)
Delete the part of the line from the left side of the visual line the cursor is on to the cursor.
Delete the part of the line from the cursor to the right side of the visual line the cursor is on.
Move the cursor to the start of the document.
Ctrl-Home (PC), Cmd-Up (Mac), Cmd-Home (Mac)
Move the cursor to the end of the document.
Ctrl-End (PC), Cmd-End (Mac), Cmd-Down (Mac)
Move the cursor to the start of the line.
Alt-Left (PC), Ctrl-A (Mac)
Move the cursor to the end of the line.
Alt-Right (PC), Ctrl-E (Mac)
Move the cursor to the right side of the visual line it is on.
Move the cursor to the left side of the visual line it is on. If this line is wrapped, that may not be the start of the line.
Move the cursor up one line.
Up, Ctrl-P (Mac)
Move down one line.
Down, Ctrl-N (Mac)
Move the cursor up one screen, and scroll up by the same distance.
PageUp, Shift-Ctrl-V (Mac)
Move the cursor down one screen, and scroll down by the same distance.
PageDown, Ctrl-V (Mac)
Move the cursor one character left, going to the previous line when hitting the start of line.
Left, Ctrl-B (Mac)
Move the cursor one character right, going to the next line when hitting the end of line.
Right, Ctrl-F (Mac)
Move the cursor to the start of the previous word.
Move the cursor to the end of the next word.
Move to the left of the group before the cursor. A group is a stretch of word characters, a stretch of punctuation characters, a newline, or a stretch of more than one whitespace character.
Ctrl-Left (PC), Alt-Left (Mac)
Move to the right of the group after the cursor (see above).
Ctrl-Right (PC), Alt-Right (Mac)
Delete the character before the cursor.
Shift-Backspace, Ctrl-H (Mac)
Delete the character after the cursor.
Delete, Ctrl-D (Mac)
Delete up to the start of the word before the cursor.
Delete up to the end of the word after the cursor.
Delete to the left of the group before the cursor.
Ctrl-Backspace (PC), Alt-Backspace (Mac)
Delete to the start of the group after the cursor.
Ctrl-Delete (PC), Ctrl-Alt-Backspace (Mac), Alt-Delete (Mac)
Auto-indent the current line or selection.
Indent the current line or selection by one indent unit.
Ctrl-] (PC), Cmd-] (Mac)
Dedent the current line or selection by one indent unit.
Ctrl-[ (PC), Cmd-[ (Mac)
Insert a tab character at the cursor.
Insert the amount of spaces that match the width a tab at the cursor position would have.
If something is selected, indent it by one indent unit. If nothing is selected, insert a tab character.
Swap the characters before and after the cursor.