Added keyup to handle text selection by shortcut