Now we have the UI abstraction, use it to implement keyboard control in Net. [originally from svn r4214]