Fixed virtual keyboard button code to use runtime event handler detection.