I suspect it's not working because:
Isn't a valid jQuery event. I think you mean to use
instead. However that's not the only problem, you're calling the
function inside the event handler, but you actually only need to call it once when the document is ready. The
function has a property called
which you can set to restrict auto-completion.
Remove the keydown event handler and call
directly, and provide the
property to restrict it.