Click the screen, then use the keyboard.

In-place block editing: mockup

Compy's code editor keeps your program valid Lua at all times: you change it one block at a time, and a block is saved only when Lua can read it. This mockup tries editing a block right where it sits in the program, instead of in a separate field at the bottom of the screen.

Keys: browsing

Up / DownMove one line (one block when "Move by line" is off)
Ctrl+Up / Ctrl+DownMove to the start of the previous / next block
PgUp / PgDnMove one page
Home / EndFirst line / the empty row after the last block
Alt+Up/Down, Alt+PgUp/PgDnScroll the view only
Enter (or Tab)Edit the highlighted block, cursor on the highlighted line
typingStart a new line at the highlighted line, inside its block; on a blank line, the code replaces it. With "Move by line" off: a new block above the highlight
Ctrl+EnterNew empty block below the highlight

Keys: editing

EnterSave the block (reformats it); if the code is unfinished at the end, start a new line
Shift+EnterNew line
EscCancel (asks first if you changed something)
arrows, Home, EndMove the cursor inside the block; Up/Down stop at its first/last line
PgUp/PgDn, Alt+arrowsScroll the view; the block may leave the screen
arrows, Enter, Esc, typingWhen the block is out of view: bring it back first (typed letters are kept)

What the mockup leaves out