Auto-complete location input rather than discarding input

Additionally replaced some magic numbers with $.ui.keyCode constants