optional hooks for keymap support