oriash93 / AutoClicker

AutoClicker is a useful simple tool for automating mouse clicks.
MIT License
327 stars 131 forks source link

Hotkey not registered if any modifiers #73

Closed TriforceSeeker closed 2 months ago

TriforceSeeker commented 1 year ago

Describe the bug Suppose hot key registered as C, pressing C while any modifier (shift, alt, ctrl, etc.) is also active, will not generate key event to start the autoclicker. Several games use SHIFT for sprint, so I'm unable to activate the clicker while sprinting for example.

From my research, it seems to be a limitation of how the activation key was implemented, as RegisterHotKey seems to only bind to one combo of modifiers, and can't catch multiple. Maybe there's a hack, else key registration needs to use a different API.

To Reproduce Steps to reproduce the behavior: 1.) Set your favorite key for a hotkey 2.) Try to activate the clicker by pressing hot key while a modifier is held (SHIFT for example) 3.) Observe autoclicker action associated with the hot key is not invoked.

Expected behavior Hotkey will activate irrespective of modifiers.

oriash93 commented 2 months ago

@TriforceSeeker thanks for taking the time to open an issue! I haven't considered it as a functionality but I will add it as an enhancement (not a bug fix).

oriash93 commented 2 months ago

This feature will allow capturing modifiers (ctrl/shift/alt) along with the hotkey:

image