Added support for detecting key released events