Fix incorrect escape codes generated when using the obsolete "normal" mouse protocol.

Fixes #105
This commit is contained in:
Kovid Goyal 2017-08-04 20:09:18 +05:30
parent 9e512ff58a
commit 2519c49c02
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -58,5 +58,5 @@ def encode_mouse_event(tracking_mode, tracking_protocol, button, action, mods, x
ans = bytes(ans)
else:
if x <= 223 and y <= 223:
ans = bytearray([0o33, ord('['), cb + 32, x + 32, y + 32])
ans = bytearray([0o33, ord('['), ord('M'), cb + 32, x + 32, y + 32])
return ans