Added keyup/keydown event handlers and caption