I'm not sure how uptodate this functionality is but:
How to Use the Player Chat Functionality
- write your mod.
- click the "execute" icon (green triangle in lower left corner of screen)
- press keyboard "m" to run the command when prompted.
- press keyboard "Esc" to get your code back on the screen, code is still running, though there is no indication of this.
- press keyboard "/" (slash) to get a text entry prompt at the bottom of the screen.
- press keyboard "Enter" to submit your written text, Chat or command to your program!