I have a command that I use in one of my applications that uses SHIFT-M
Is there anyway to have this hotkey trigger be disabled when I'm typing text in an active field within the application where SHIFT-M will be ignored as a hot-key trigger and instead provide only a capital-"M" ? I have searched the forum and I think I mostly found in past posts that this was not possible with "Single key hot keys"-- but since I'm using the modifier of SHIFT, I'm wondering if there is a way to have KM ignore SHIFT-M when actively typing in a field. Thank you very much for any advice.
Yes you can search for the window that is in front and then if that window is seen you can have it ignor that command. I do this often in various apps.
That works if the front window is nothing but a text input field, but I don't see how it would work if you were (for example) in a Safari text input box here on the forums. Am I missing something?
Assuming I'm not, there is no official way (that I've ever seen) to determine that the cursor is in a text input field. You can try various things to work around that, but I don't think I've seen a 100% foolproof solution here.
For instance, you can see if Edit > Paste and Match Style is enabled, which will generally only be true if you're in a text field. But of course, that relies on having some text on the clipboard in the first place, and some weird app may have it enabled all the time.
You can try to do a screen capture around the cursor location and see if you can match the I-beam cursor, but that thing is basically impossible for Keyboard Maestro to see, given how small it is and how similar it is to other onscreen shapes.
If this is designed to cover only one specific app, you might look at that app's menus; maybe it does something unique when you're in a text input field and you could use that as an identifier.
Regardless of the method you find (if you can find one), you'd add it as a condition in your existing Shift-M macro: If (text field check) is true then send keystroke M, otherwise do the normal thing.
None that I have seen either and windows that don't show names don't work with this, which is unfortunate.
This is great advice. I use this frequently as well for several macros that check for the state of things like this that really don't relate to the function I am trying to do but they get greyed out. Like playing in a DAW menu items change so that is how I check that it is playing rather than looking for a screenshot which is a much better approach.