diff --git a/docs/changelog.rst b/docs/changelog.rst index 22d16b70f..6462f1da1 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -18,6 +18,10 @@ To update |kitty|, :doc:`follow the instructions `. - Linux: Fix some very long ligatures being rendered incorrectly at some font sizes (:iss:`3896`) +- Fix shift+middle click to paste sending a mouse press event but no release + event which breaks some applications that grab the mouse but cant handle + mouse events (:iss:`3902`) + 0.22.2 [2021-08-02] ---------------------- diff --git a/kitty/options/definition.py b/kitty/options/definition.py index ec2fceb27..585c8e81b 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -555,6 +555,10 @@ mma('Paste from the primary selection even when grabbed', 'paste_selection_grabbed shift+middle release ungrabbed,grabbed paste_selection', ) +mma('Discard press event for middle click paste', + 'paste_selection_grabbed shift+middle press grabbed discard_event', + ) + mma('Start selecting text even when grabbed', 'start_simple_selection_grabbed shift+left press ungrabbed,grabbed mouse_selection normal', ) diff --git a/kitty/options/types.py b/kitty/options/types.py index 5e9778f69..7cd75cdb9 100644 --- a/kitty/options/types.py +++ b/kitty/options/types.py @@ -889,6 +889,8 @@ defaults.mouse_map = [ MouseMapping(2, 1, -1, True, KeyAction('paste_selection')), # paste_selection_grabbed MouseMapping(2, 1, -1, False, KeyAction('paste_selection')), + # paste_selection_grabbed + MouseMapping(2, 1, 1, True, KeyAction('discard_event')), # start_simple_selection_grabbed MouseMapping(0, 1, 1, True, KeyAction('mouse_selection', (0,))), # start_simple_selection_grabbed