Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am using a Windows XP VM with Parallels 8 under Mountain Lion. I have a remote desktop connection from XP that does not allow pasting from the clipboard, but typing works, of course. I have an AppleScript simulating as if I typed the clipboard. However, the Shift key is not held down for modified keys, even though all keyboard layouts are in sync otherwise. Also curiously, numeric characters don't go through while "(" is turned into "9". See the full example below.

This happens in script-typing into XP desktop apps too, RDC only motivates why I cannot simply paste the clipboard. But this is a problem of scripted keystrokes in Parallels!

This only happens for this script and even only some keys with the script, the shift key is synchronized otherwise.

The remote connection is not super fast, but low speed did not break the use of the script in other cases (when I did not need the XP VM).

What is there to do?

This KB-article is about a similar shift-key issue from previous versions, even RDC-specific, but did not solve my problem: http://kb.parallels.com/en/9129

Here is the script:

on run
    repeat with theItem in (the clipboard)
        tell application "System Events" to keystroke theItem
        delay 0.01
    end repeat
end run

This is what I tried to copy and paste (by scripted typing):

~!@#$%^&*()_+

QWERTYUIOP{}|

ASDFGHJKL:"

ZXCVBNM<>?

`1234567890-=

qwertyuiop[]\

asdfghjkl;'

zxcvbnm,./

This is what I got, see the messed-up order of rows, even, and even the cursor was before the x in last full-length line, not at the end — somehow it jumped to the beginning of a row before typing more.

`1234567*90-+

qwertyuiop[]\

asdfghjkl;'

-=

qwertyuiop[]\

asdfghjkl;'

zxcvbnm,/

xcvbnm,./

`

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

It's a problem that i have brought to their attention on multiple occasions. and as of right now, they still haven't even fixed the problem in v9 betas. so, if this is a deal breker for you (as it was for me), keep using parallels v7. it's the last one that they have that applescripting still works properly in.

share|improve this answer
    
Matt, thanks a lot again. Please let me know if you figured something out since. E.g. on Mavericks? Or that's a Parallels-specific problem? Still not fixed in more recent betas? –  László Jul 10 '13 at 19:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.