diff --git a/docs/changelog.rst b/docs/changelog.rst index cce4440c0..ca97b11fe 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -108,6 +108,9 @@ To update |kitty|, :doc:`follow the instructions `. - Allow setting :opt:`active_border_color` to ``none`` to not draw a border around the active window (:iss:`805`) +- Use negative values for :opt:`mouse_hide_wait` to hide the mouse cursor + immediately when pressing a key (:iss:`1534`) + 0.13.3 [2019-01-19] ------------------------------ diff --git a/kitty/config_data.py b/kitty/config_data.py index e9cfea8bf..c13355335 100644 --- a/kitty/config_data.py +++ b/kitty/config_data.py @@ -445,9 +445,10 @@ o('click_interval', -1.0, option_type=float, long_text=_(''' The interval between successive clicks to detect double/triple clicks (in seconds). Negative numbers will use the system default instead, if available, or fallback to 0.5.''')) -o('mouse_hide_wait', 3.0, option_type=positive_float, long_text=_(''' +o('mouse_hide_wait', 3.0, option_type=float, long_text=_(''' Hide mouse cursor after the specified number of seconds -of the mouse not being used. Set to zero to disable mouse cursor hiding.''')) +of the mouse not being used. Set to zero to disable mouse cursor hiding. +Set to a negative value to hide the mouse cursor immediately when typing text.''')) o('focus_follows_mouse', False, long_text=_(''' Set the active window to the window under the mouse when diff --git a/kitty/keys.c b/kitty/keys.c index 58e0e8781..4168f04b0 100644 --- a/kitty/keys.c +++ b/kitty/keys.c @@ -128,6 +128,7 @@ on_key_input(int key, int scancode, int action, int mods, const char* text, int (action == GLFW_RELEASE ? "RELEASE" : (action == GLFW_PRESS ? "PRESS" : "REPEAT")), mods, text, state); if (!w) { debug("no active window, ignoring\n"); return; } + if (OPT(mouse_hide_wait) < 0) hide_mouse(global_state.callback_os_window); Screen *screen = w->render_data.screen; switch(state) { case 1: // update pre-edit text