I need to build a Google Suggest style drop-down box, but unfortunately am unable to use jQuery or Prototype due to various licensing restrictions. Pretty much the only thing I can use is public-domain stuff that I can modify and am not required to attribute ownership of someone else to.
In any case, I can handle the AJAX stuff fine, and the server-side scripting. Where I'm stuck is how to make Javascript respond to keyboard events:
- Select the next item in the list when the user hits the down arrow key
- Select and fill the text box with the selected item when they hit [Enter]
- Close the suggest box when they hit [Esc]
- etc. etc. etc.
Thoughts? Examples?