I want to implement a series of hotkeys using Autohotkey (mostly to improve my effectiveness), but I want them to only be active when I'm typing text, and not when I'm navigating or playing. I know Autohotkey can set conditions based on which window is focused, and so I could set these hotkeys to only trigger inside notepad++, MSWord, etc.

The problem is that I would also like these hotkeys to work when I'm typing text in firefox (like this question right here). However, I can't just set them to always trigger inside firefox because I'm not always typing in it and so it would mess up other hotkeys associated to firefox. So, is there a way I can set these hotkeys to only be active when I'm inside a text input field? This way they wouldn't mess up with regular firefox hotkeys while I'm navigating, but would still be active when I'm typing.


The only way I can think of doing this is possibly with a Greasemonkey script. (https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/) You'll have to write an event listener in Javascript that binds a function to every single input field on a page. When the field is focused, the function triggers the desired hotkey / keycombination and at the same time lets you go on your merry way.

Not 100% sure but this might be a step in the right direction at least.


You should be able to have autohotkey use a condition based on a window class, use window spy to see what the window class of the text edit window is and activate on that rather than the application window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.