Patch debug handle_keys()
Rewriting handle_key() part5