Applescript, Windows 10, Parallels 14, and modifier keys
Thread poster: Lennart Luhtaru

Lennart Luhtaru  Identity Verified
United States
Member
English to Estonian
+ ...
Jun 9

For whatever reason parallels doesn't seem to send any modifier keys to windows when I use applescript. I've tried the following ways to create "š" into notepad but all will produce "s" instead of "š" (alt/option + s). What am I doing wrong? The script works perfect inside MacOS but modifier keys seem to get ignored by parallels. The results are the same when I try to use shift instead to create "S" not "s". The point to making it work is to then create applescripts for elgato stream deck (or ... See more
For whatever reason parallels doesn't seem to send any modifier keys to windows when I use applescript. I've tried the following ways to create "š" into notepad but all will produce "s" instead of "š" (alt/option + s). What am I doing wrong? The script works perfect inside MacOS but modifier keys seem to get ignored by parallels. The results are the same when I try to use shift instead to create "S" not "s". The point to making it work is to then create applescripts for elgato stream deck (or any similar launcher) for weird symbols like μ or × and have them work in both MacOS and Windows applications. Anyone have any ideas?
---------
tell application "System Events"
key down option
key code 1
key up option
end tell
---------
tell application "System Events"
keystroke "š"
end tell
---------
tell application "System Events"
key code 1 using option down
end tell
--------
Collapse


 

Hans Lenting  Identity Verified
Netherlands
Member (2006)
German to Dutch
Doesn't work for me Jun 9

I cannot get your script to work on my Mac with the U.S. International PC keyboard layout.

While looking at your script, I was wondering whether it wouldn't be a better idea to insert the character you need via the system clipboard. No hassle with modifier key states.

Personally, I use https://www.ergonis.com/products/popcharx/ both for Windows and macOS.


 

Lennart Luhtaru  Identity Verified
United States
Member
English to Estonian
+ ...
TOPIC STARTER
Shift Jun 9

Try using shift instead of option. That should work even with US layout and type capital S. If I can get applescript to work, I can just configure https://www.elgato.com/en/gaming/stream-deck or any other similar LCD keypads trigger applescripts and don't have to deal with clipboard or remembering ALT+codes or key combinations.

 

Lennart Luhtaru  Identity Verified
United States
Member
English to Estonian
+ ...
TOPIC STARTER
I just avoided modifier keys now Jun 11

I decided I don't have time to troubleshoot Parallels and applescripts for the modifier key problem any more. If it starts working in the future, all the power to them but for now I had to create triple the amount of scripts (one for memoq one for studio and one normal for MacOS). Applescript just uses clipboard + menu options instead now and I can just create shortcuts in stream deck configurator to switch profiles quickly.

So the no modifier keys solution is something like this:... See more
I decided I don't have time to troubleshoot Parallels and applescripts for the modifier key problem any more. If it starts working in the future, all the power to them but for now I had to create triple the amount of scripts (one for memoq one for studio and one normal for MacOS). Applescript just uses clipboard + menu options instead now and I can just create shortcuts in stream deck configurator to switch profiles quickly.

So the no modifier keys solution is something like this:
-----
tell application "System Events"
set the clipboard to "×"
tell application "System Events" to tell process "SDL Trados Studio 2019"
tell menu bar item "Edit" of menu bar 1
click menu item "Paste" of menu 1
end tell
end tell
end tell
-----

Pic of Stream Deck is attached. Every key can be reconfigured to whatever you feel like and I just save the bottom right key for profile switch. If someone has the same problem (uses a Mac and wants to use a reconfigurable LCD keypad with both Mac and Win apps) then feel free to let me know, I can explain what I did to make it work.

IMG_0492
IMG_0493
Collapse


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Applescript, Windows 10, Parallels 14, and modifier keys

Advanced search






Déjà Vu X3
Try it, Love it

Find out why Déjà Vu is today the most flexible, customizable and user-friendly tool on the market. See the brand new features in action: *Completely redesigned user interface *Live Preview *Inline spell checking *Inline

More info »
SDL MultiTerm 2019
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2019 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2019 you can automatically create term lists from your existing documentation to save time.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search