- the shortcut sends the selected code to the terminal (this is possible)
- if I hit the shortcut when nothing is selected, the line where the cursor currently is gets sent to the terminal and the cursor moves to the next line of code
- if the cursor is at the beginning of a block of code like an if-statement or a loop, the whole statement is sent to the terminal and the cursor moves to after the statement
RStudio has this behaviour by default, I find it very convenient and I haven't been able to replicate it in other environments.