From 07f28e6ec75ee1a30cecc21952f85c2a910ab642 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Sat, 29 Aug 2020 13:31:46 +0200 Subject: [PATCH] Don't use GLFW buttons in custom kitten example Since send_mouse_event now uses the same numbers as X11 for buttons instead of the same numbers as GLFW, it is misleading to use the GLFW constants. I forgot to change this example in commit 8efe08c4. --- docs/kittens/custom.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/kittens/custom.rst b/docs/kittens/custom.rst index 5db89077e..a3b830be5 100644 --- a/docs/kittens/custom.rst +++ b/docs/kittens/custom.rst @@ -156,8 +156,8 @@ from ``kitty.fast_data_types``. For example, to send a left click at position x: 2, y: 3 to the active window:: - from kitty.fast_data_types import send_mouse_event, GLFW_MOUSE_BUTTON_LEFT, PRESS - send_mouse_event(boss.active_window.screen, 2, 3, GLFW_MOUSE_BUTTON_LEFT, PRESS, 0) + from kitty.fast_data_types import send_mouse_event, PRESS + send_mouse_event(boss.active_window.screen, 2, 3, 1, PRESS, 0) The function will only send the event if the program is receiving events of that type, and will return ``True`` if it sent the event, and ``False`` if not.