I can't figure out a way to do this purely in KM. It seems to me the following should work, but all it does is scroll up 100. There is no evidence the control key is down. Ideas?
This doesn't work either; in fact it does nothing. (The alert isn't sounded.) It is activated by
⌃F1. It should scroll up 100 every 1.5 seconds until I release ⌃.
Yes, I discovered that too – that the macro keystroke had to be a control modified key. My problem is that my macro doesn’t do anything even then. What had envisioned is behavior like Zoom In/Out in standard applications — let’s say every time I press ⌃+ it magnifies further, and every time I press ⌃–. Actually I’d be content with something much simpler: I magnify the normal way, and ⌃0 snaps back to no magnification by control-scrolling down by a large number of pixels.
Not a dumb question at all. The behavior of ⌥⌘= is fine, though I wish it jumped by larger increments (which I could fix with a KM macro that simulates N ⌥⌘= keystrokes). The specific goal was to snap back to no magnification. I envisioned simply scrolling down by a large amount. Well, combining your comment with my parenthetical though, I can just have a keystroke that simulated a large enough number of ⌥⌘– keystrokes to snap back to no magnification. Thanks for the suggestion.
This isn't quite accurate, but what it does do is what I want: it magnifies to level it was at when you last released ⌃⌥. This is great, because I pretty much always use the same magnification.
However the use of ⌃⌥ is out of the question — I am using very man ⌃⌥ keystrokes for application shortcuts, utility features, and KM macros. So I faked it out:
This isn't quite accurate, but what it does do is what I want: it magnifies to level it was at when you last released ⌃⌥. This is great, because I pretty much always use the same magnification.
However the use of ⌃⌥ is out of the question — I am using very many ⌃⌥ keystrokes for application shortcuts, utility features, and KM macros. So I faked it out:
Not sure yet whether I want to wait for F1 up or Control up.
Not sure what you mean with “isn’t quite accurate”. My description corresponds to what I’m experiencing (macOS El Capitan, still). Just tried it again:
You set up the desired level of magnification once -> then it’s at your ⌃⌥-finger-tips.
But, honestly, I’m loosing tracks of what you wanted to achieve originally
BTW: Be careful with these key down <modifier> AppleScripts. If you forget to ‘up’ the key, your Mac will no longer be your best friend (until you have restarted it)
You’ve sent an Option-key-down to your Mac via AppleScript … and you are lost. You can’t even type “Help” because it comes out as “Ó´¬π”
But then the worst thing is: your Mac is still smiling at you. Apparently she (or he) has no clue that something is wrong. But you know the only way out is to kill her, brutally. Your finger is approaching that shutdown button, and she’s still smiling at you. Best to close your eyes when pressing down that button.
I don’t think so… It’s my Mac, not my Windows machine. Although I have to admit I do run Windows in Parallels sometimes, and I do allow them to talk to each other, so you might be right! Argh!!!
Your original answer told me exactly what I needed to know. The problem is that since Apple is giving us no way to set the key(s) we want for automatic zoom, enabling automatic zoom screws up all my very many keybindings that include ⌃⌥, so it is basically useless.
The only idea I have left — and maybe someone could come up with something else —would be to leave automatic scrolling off, have some key (e.g., ⌃F1) turn it off, and when released turn it back off. (Probably can’t get to that by AppleScript, probably can by GUI scripting, maybe can by ASObjc.)
on modifierKeyTest()
set keyDown to {commandDown:false, optionDown:false, controlDown:false, shiftDown:false}
set currentModifiers to current application's class "NSEvent"'s modifierFlags()
tell keyDown
set its optionDown to (currentModifiers div (get current application's NSAlternateKeyMask) mod 2 is 1)
set its commandDown to (currentModifiers div (get current application's NSCommandKeyMask) mod 2 is 1)
set its shiftDown to (currentModifiers div (get current application's NSShiftKeyMask) mod 2 is 1)
set its controlDown to (currentModifiers div (get current application's NSControlKeyMask) mod 2 is 1)
end tell
return keyDown
end modifierKeyTest