What exactly are you trying to achieve? E.g. work in Textedit and use Alt+Tab to navigate to Notepad? So from one Mac app to one Windows app?
Did you try Modality mode?
Hey ALYB, thanks for getting back to me.
What is Modality Mode ?
And in general: No, I don't want to swap apps from Mac to Win or vice versa - only INSIDE Windows (where alt-Tab equals cmd-Tab as used in Mac OS toggling apps) - which works fine using the QWERTY-keyboard....only emulating alt-Tab through KM doesn't work - and that only sometimes which makes it even more annoying...
http://download.parallels.com/stm/docs/en/Parallels_Desktop_Users_Guide/27280.htm
Still trying to understand what you want to do. Why use KM for actions in Windows only?
Windows has AutoHotkey as an automation app.
What does the keyboard shortcut menu of Parallels say about Alt+Tab? Can you reassign it?
Else you could use AHK to create an alias and trigger this one via KM?
Sorry for the incomplete set of information. The alt-Tab is just a simple example for that the (most simple) transfer of KM macros to Parallels doesn't seem to work properly... What I want to achieve long term is using much more complex macros including timed mouse clicks on the screen and many kinds of keyboard typing combinations etc. - triggered by a hardware key controller as described above... as I also need to use KM for some also complex macro stuff on the Mac itself I'd rather prefer using (and learning!) only one macro software as I used to do with the ingenious ControllerMate (R.I.P.!) - which btw let KM look like a stupid or - said more polite at least - less intuitive piece of software in it's Automator-style GUI... ;-(
Just think KM feels like using MS-DOS and CM like Mac-OS in comparison...
You're trying to send simulated events to an emulated machine, including "clicking" in precise places? I foresee a world of pain...
@ALYB's plan might be the best. I think "Modality mode" is "Coherence" in my version -- it's where Parallels makes the Windows apps "appear" on your screen like Mac apps rather than showing them inside a window showing the virtual PC. That would allow you to use Cmd-Tab to switch between apps, and might make sending user interface events easier.
Alternatively, you could use the following AppleScript in a KM macro to switch Windows apps inside Parallels -- it requires Parallels to be the active app, and the VM you're targeting to be the active window:
tell application "System Events"
keystroke (ASCII character 9) using option down
end
Hey Nige_S.....why does this sound so absurd to you ? With ControllerMate I had these exact types of applications - both simple keyboard shortcuts and mouse clicks on screen - running 100% reliably and without any timing or performance issues....so what's the point ?
Do you have experience in / evidence of what you're saying ? I mean that this is kind of impossible to do with KM in combination with Parallels ?
I'll definitely try out your Apple Script approach - although it doesn't seem to be very promising if you're right about the (non-)performance of these most simple tasks....
I've migrated from Parallels to VMware Fusion.
I recorded a demo with Windows Notepad running in Unity view (like Parallels' Modality):
You can use the Type action to start an AutoHotkey script in a Windows app.
Perhaps you can use PowerShell also (but I'm not familiair with it).
And at what point did I use the word "absurd"?
Do I forsee pain? Yes. You're talking about mouse clicks in a window which might mean tracking both the point in the window you want to click and the position of said window on your screen, which is why Unity/Modality/Cohesion mode might be easier. I've done UI interaction in Apple Remote Desktop, which is the same problem -- doable, but a lot of extra work.
I don't know why a simulated Alt-Tab isn't working for you, though I suspect (mis)interaction between how KM sends the simulated keypress and how Parallels interprets it and forwards it to Windows. I know the AppleScript snippet works though, which gives you a workaround for for both Alt-Tab and for any other keystrokes that might give you problems.
But unless you post your macro, anything else is guesswork.
Just meant to use the word in a sense of "not being practicable"....
And - while being thankful for your suggestions like Apple Script workarounds - how much sense does it make to create such a pile of efforts and programming in order to process a most simple task like pressing ONE KEY with a modifier ?
Don't get me wrong, this is not a criticism in your direction by any means - if at all it's questioning how good KM is (programmed) or whether it fits my needs in general because I DO need to work with Parallels...and again: Not riding a dead horse here but with Controllermate this exact process you've described ("(mis)interaction between how KM sends the simulated keypress and how Parallels interprets it and forwards it to Windows") was not even a thought....it just worked - with or without Parallels...
Sorry, but do you really need a macro being posted containing "Type alt-Tab" ?
Btw: Coherence / Modality Mode is not an option - need to work in Fullscreen with Win...
UPDATE: Tried Coherence Mode and it doesn't work in my case - neet to use the intended alt-Tab also for switching back and forth between two windows of the same application - and Parallels isn't capable of treating those windows as separate "cmd-Tab-able" items...
Yes, ControllerMate did -- past tense. And it was able to because it worked at a very low level, via Kernel Extensions. Apple shot that particular horse, ControllerMate fell off it, while KM continues to trot on despite Apple removing the stirrups and reins.
And I think we've done that particular metaphor to death The take home is that you really can't blame KM's programming for it not being able to do something which Apple has stopped programmers doing! So let's move on to more constructive things...
I spend all day dealing with people who call the Command key the Alt key, the Option key the Alt key, the Control key the Command key... There is no Alt key on a Mac, so posting the macro would at least remove that possible confusion. Plus, people smarter than me might spot something in the Action's options.
Providing the macro, your Mac OS version, KM version, Parallels version, Windows version, the Windows app(s) you're trying to control -- all these help people to help you. And isn't that why you asked your question in the first place?
And in the spirit of helping...
Once you go into Coherence mode, windows in a Windows app are treated like windows in a Mac app -- try using "Command-~" instead of "Alt-Tab"
I can see that....thanks for this insight and clarifications...
Sorry to correct you but there is or at least for decades was an alt key - just look at the last generation of white aluminum Apple keyboards which lies right in front of me....and I think I was pretty clear about when to talk about alt (for tabbing in Windows, and here it definitely IS "alt") and about cmd (for tabbing in MacOS)....but anyway....see the macro here:
That's all....
Sorry again, but that's exactly what is not working - The Coherence Mode (which by the way slows many things down significantly - like obvious image flickering when swapping apps) does not treat separate windows of the same application as CMD-Tab-able items - only the "whole Win app" is being processed as one app in the CMD-Tab chain....
But not now (at least on UK English keyboards). My users only know what's in front of them and rarely manage to keep a keyboard for more than a couple years. Grrrrr...
Can you try again? Note that it's "Command-~" -- a tilde, not a tab, just the same as you'd use for rotating through eg Safari windows. It works for me -- if it doesn't for you then we may be fighting language/keyboard mapping issues as well as all the rest...
Thanks for clarifying that again - indeed I've overlooked that one....and you're right that this is partly a language/keyboard issue....I don't have a tilde key here on the German keyboard version But I'll try to figure out which one is the appropriate for this particular function....
Hmmmm....can't figure out any shortcut for "rotating through Safari windows".....can you isolate this exact Safari function in the menu bar tree and make a screenshot ? Like that I might follow you here and compare it with the shortcuts that are available here in order to get the keys being used on the German keyboard layout
....
Try in the Finder, Window menu, third item "Cycle through Windows". It's actually Command-` (backtick) which for me is the same key as tilde -- apologies for the mis-direction.
This is possibly a timing issue.
Try this: Keep holding down the alt key on your kbd while you try your macro. Does it then work all the time?
If so, find a way to type the alt key separately in your macro (no idea if KM offers that), and put a small delay (eg 100ms) between pressing the alt and the tab keys, and also a delay before relasing both again.
If that's not helping, try this: find other alt-key commands that do something every time, eg. toggle a checkbox or something else that you can see esch time to react to that shortcut. Then issue that with KM. Does that work every time? That would suggest that the alt-Tab shortcut is checked by Windows in an irregular way, ie it is not reacting to the keyboard event but instead polls the pressed keys regularly in background. And if KM's event is too short, then the polling can be missing the brief period the keys appear to be pressed. To work around this, again, you'll need to find a way to have these keys pressed for a longer time.
@uliauer -- I may have cracked it. If not, I think I've some idea of what's going on... Parallels is getting confused where the KM-sent "Alt-Tab" should be directed. Try this:
With your target VM active, go to the "Actions" menu, then "Configure...". Select the "Hardware" tab, then "Mouse & Keyboard" from the list on the left, then "Open Shortcuts Preferences...". Select "macOS System Shortcuts" from the list on the left, and set "Send macOS system shortcuts:" to "Never". (Hopefully that gets you to the right setting -- if localisation makes it meaningless then let me know and I'll DM you some screenshots.)
That's made my KM "Alt-Tab" test macro 100% successful -- hopefully it'll do the same for you. It seems counter-intuitive because we're now sending the key combo to the Mac to be forwarded to Parallels rather than directly to the VM, but I guess we're back to the difference between old-style virtual keyboard via a kernel extension and new-style events emulation/passing.
That Parallels setting only applies when the target VM is the active window. It'll alter the behaviour of *all shortcuts when the VM is frontmost, so beware side effects -- if too many, it might be better to revert to the old config setting and use the AppleScript workround instead.
Thanks everybody for all of your suggestions ! I'm very busy at the moment buying a home and don't have time to test things and respond though - I'll get back to it within approx.1-2 weeks....
Hello again !
I've installed a new(er) version of Parallels Desktop on my new Macbook Pro M1 and Windows 11 (ARM version) as a virtual machine...
Now simply "transmitting" / using the normal "alt-Tab" command as "Type a Keystroke" works fine !!!
So it might have been an issue with my particular setup that made KM having problems to "get the commands through" seamlessly...so this issue can be treated as "solved".
But also "Nige_S" 's tip with the Apple Script worked (also on my old system) - thanks again for this suggestion !
As a feedback for everyone reading this threat - Nige_S's preferences adjustments didn't solve the probelem for me...