Add click and doubleclick events as well

This commit is contained in:
Kovid Goyal
2021-05-11 13:59:52 +05:30
parent 1c9674cec9
commit cb21422836
3 changed files with 51 additions and 11 deletions

View File

@@ -492,7 +492,7 @@ def parse_mouse_action(val: str, mouse_mappings: List[MouseMapping]) -> None:
log_error(f'Mouse button: {xbutton} not recognized, ignoring')
return
try:
count = {'release': -1, 'press': 1, 'doublepress': 2, 'triplepress': 3}[event.lower()]
count = {'doubleclick': -3, 'click': -2, 'release': -1, 'press': 1, 'doublepress': 2, 'triplepress': 3}[event.lower()]
except KeyError:
log_error(f'Mouse event type: {event} not recognized, ignoring')
return