fixup! Merge pull request #1158 from paymand/fix_for_keyevent