Commands to insert templates: For example "?" might insert an if command, while + might insert a call to the + function.
Typing a letter should initiate insertion of a variable reference. E.g. typing "a" would insert a new var node with name "a", create an "enter box", and change the keyboard focus to the box
Typing a number should enter a new number constant.
Typing a " should enter a new string constant.
Certain key combinations should change the current selection. E.g. arrows, tab, etc. (See requirements in Trello)
Cmd/Cntl-X should push the current selection to the trash and delete it.
Cmd/Cntl-C should push the current selection to the trash.
Cmd/Cntl-V should insert the top selection on the trash at the current selection.
Cmd/Cntl-1,2,3 etc are like Cmd/Cntl-V, but reach further down the trash stack.
Cmd/Cntl-B should swap the current selection with the top of the trash. I.e. we should be able to do Cntl-C, move the selection, Cntl-B to swap. This means that the trash should be a stack of selections, which is not what it is now.
See requirements for details. Here are some ideas