Take an editor. Add event handler to editor: After Return was pressed, execute: print(userFunction(lineAbove())) That's it. Now plug in a user function - whatever that may be in the desired "app"-lication [it's a magic word, "APP"!] - to achieve the desired functionality and/or implement the desired commands.