I have no idea I can write my thoughts properly in english! Maybe it is more clear when I write the Story down.
For a remote system at the customer, we have to use the VMWare Horizon Client. No idea it's a Server side configuration or something else.
When I type in the Windows password it's working (of course), cmd or strg + v are not working with clipboard from the Mac OS. The Strange thing is that: When I use the Clipboard within BTT as type in text … It shows "Wrong Password".
I figured out that minimum the uppercase letters from Mac OS Clipboard are written as
lowercase letters. I had similar issues when I try to send Keystrokes in Proxmox to a specific VM.
And sometimes It seems the "type in" function is typing too fast for a few use cases.
Think it could work when the Clipboard would converted to Keystrokes with Modifier (like keystrokes in apple script or sendkey in qemu). A bit like a output "Key sequence".
Also an adjustable Delay between the keystrokes seem sometimes helpful… Used the "type in" often in Citrix environment… for the most stuff it worked very well with the configured delay… but when I try to copy something like an RSA key, some keystrokes in the middle were lost during transmission.
Thanks for the answer @Frank1. I have this kind of delay already in use…
but it's not very helpful for longer strings.
For a password this would be a high security risk, because it would be stored as clear text.
And for the Pubkey of a 4096 bit RSA Keypair, an action would have around 700 keystrokes + plus 700 times the delay
I wrote an applescript (not tested on the hot system yet) I think this could handle my use case…
I also know "real Programmers" will hate me for the variable names. Scripted multiple times in the last 20 years since finish my apprenticeship but I'm still more Ops then Dev
set ccstring to the clipboard
set lccstring to count ccstring
set scharKey to {13, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126}
set scharValue to {36, 49, 18, 39, 20, 21, 23, 26, 39, 25, 29, 28, 24, 43, 27, 47, 44, 29, 18, 19, 20, 21, 23, 22, 26, 28, 25, 41, 41, 43, 24, 47, 44, 19, 0, 11, 8, 2, 14, 3, 5, 4, 34, 38, 40, 37, 46, 45, 31, 35, 12, 15, 1, 17, 32, 9, 13, 7, 16, 6, 33, 42, 30, 22, 27, 50, 0, 11, 8, 2, 14, 3, 5, 4, 34, 38, 40, 37, 46, 45, 31, 35, 12, 15, 1, 17, 32, 9, 13, 7, 16, 6, 33, 42, 30, 50}
repeat with a from 1 to lccstring
set b to text item a of ccstring
set c to (ASCII number of b)
if ((c > 32 and c < 39) or (c > 39 and c < 44) or c = 58 or (c > 59 and c < 91) or c = 94 or c = 95 or (c > 122 and c < 127)) then
set f to item list_position(c, scharKey) of scharValue
tell application "System Events" to key code f using shift down
else
set f to item list_position(c, scharKey) of scharValue
tell application "System Events" to key code f
end if
delay 0.2
end repeat
on list_position(this_item, this_list)
repeat with i from 1 to the count of this_list
if item i of this_list is this_item then return i
end repeat
return 1
end list_position
1st day back at work …
Tested BTT with the Horizon client again.
Login to Windows with Password from the clipboard:
CMD+V (OS or BTT "Einfügen durch …") not working
BTT "Einfügen durch Tippen" not working (because everything lowercase)
BTT "Apple Script starten (blockierend)" is working
Logged in to the Windows Machine
CMD+V (OS or BTT "Einfügen durch …") is working case sensitive
BTT "Einfügen durch Tippen" is working everything lowercase
BTT "Apple Script starten (blockierend)" is working case sensitive (for passwords ASCII < 127 and OS Blocked CMD-V ok for other text with tabs or Umlaute, the Lists and the loop has to be modified.)