ILikeAI / AlwaysReddy

AlwaysReddy is a LLM voice assistant that is always just a hotkey away.
MIT License
524 stars 50 forks source link

Changed keyboard handler to autohotkey using the ahk wrapper in order to avoid conflicts with external autohotkey scripts. #50

Closed j4byers closed 1 month ago

j4byers commented 1 month ago

I switched everything to autohotkey instead of the previous keyboard handler. I had a heck of a time figuring out how to convert the push to talk functionality. Either the ahk library has some limitations or I haven't figured it out. There is a boolean keystate function, but it never worked when the full record hotkey was passed to it. It seems to only work for modifiers, or at least it didn't work for the mouse button when I attempted. So I created a new config variable called RECORD_MODIFIER. The push to talk functionality will work when this key is released.

So right now based on my default config, record triggers on/off with ctrl+mouse4, but if ctrl is held after triggering, it will keep recording until it is released.

j4byers commented 1 month ago

I just noticed I forgot to add back the check for double press (clipboard handling). I will update tonight and send new pull request.