3380c: improve keyboard input behaviour on modal boxes

http://code.google.com/p/otwarchive/issues/detail?id=3380