Start by adding a gtk.Entry control above the scrolled window. This will emulate the first line of your text view that will always show.
Add signal handlers that move focus from the entry control to the text view when pressing e.g. the enter key or cursor down.
Add signal handlers that move focus from the text view to the entry control when pressing cursor up if you're on the first line.