boppreh / keyboard

Hook and simulate global keyboard events on Windows and Linux.
MIT License
3.74k stars 432 forks source link

Make releasing keys when stashing a state optional #647

Open Guy-L opened 3 weeks ago

Guy-L commented 3 weeks ago

I have a use case for getting pressed key scancodes without releasing them (I'm actually not sure why you'd want this to be the default behavior, but that's besides the point). This PR simply adds a parameter for whether keys should be released in stash_state(), which defaults to True.