Improve up/down key behavior.
Improve usability of setVal. Fixes #646.