Merge branch 'docs-kitten-example-mouse-buttons' of https://github.com/trygveaa/kitty into master

This commit is contained in:
Kovid Goyal 2020-08-29 18:06:55 +05:30
commit 1bcd0c4471
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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:: 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 from kitty.fast_data_types import send_mouse_event, PRESS
send_mouse_event(boss.active_window.screen, 2, 3, GLFW_MOUSE_BUTTON_LEFT, PRESS, 0) 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 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. that type, and will return ``True`` if it sent the event, and ``False`` if not.