How to Detect Edit Mode of Forground Window?

Knockz

Member
Joined
Mar 18, 2008
Messages
9
Programming Experience
Beginner
Hi, I've been searching all over and unable to find a way to do this. I'm not sure if it is possible but thought I would ask.

I have a program that runs in the background and hooks the keyboard keys to perform actions when a hotkey is pressed.

However I don't want it to do anything if the forground window (of another application) is in edit mode so if you map the v key, the user will still be able to enter it in a text box.

Is there a way to detect if the forground window or control is currently in edit mode?
 
The solution to your problem is to only use hotkeys that are unlikely to used by other applications. I consider it good practice to always require two modifiers for every hotkey. That won't stop anyone typing into another window. Using hotkeys that are used for general input is just bad practice.
 
Hi Jmcilhinney,

I understand your point of view. However the hotkey app has configuration options to allow what hotkey to use. So they could use something like ctrl+f1 or whatever. The app monitors for a specific app to be in the foreground before acting upon it so it doesn't affect other apps on the computer. But at the same time I would like it not to act when the user is typing in a text box or something similar on the foreground app.

I would understand if this was not possible and leave it as it, but would love to know if there is a way to do such a thing.
 
Back
Top