NULL is acceptable for `on_key` and `key_down`