Trim input text. Fixes lxde/lxde-qt#139
Add Ctrl-p and Ctrl-n movement shortcuts.

Ctrl-p moves the focus one item up and Ctrl-n moves the focus one item
down.