Update input field as user moves dropdown #42 (Improved)

- Modify keydownHandler() to improve portability
- Modify keydownHandler() to improve behavior triggered by hitting ESC key
- Add tests