on_key_pressed() and on_character_pressed() are independent (fix #344).