DuckingQuack wrote: ↑16 Nov 2023, 16:59
Everything I've read suggests no issues sending keystrokes to RDP, so perhaps the issue is the key reassignment?
This script uses the send command to send to the keystrokes, test this and let me know if it works for you and we can go from there... like further improvements.
Code: Select all
#Requires AutoHotkey v2.0
#SingleInstance Force
DetectHiddenWindows True
InstallMouseHook
InstallKeybdHook
Esc::ExitApp
SetCapsLockState "AlwaysOff"
#HotIf GetKeyState("CapsLock", "P")
{
i::Send("{Up}")
j::Send("{Left}")
k::Send("{Down}")
l::Send("{Right}")
u::Send("{PgUp}")
o::Send("{PgDn}")
Backspace::Send("{Del}")
}
#HotIf
Wow, it is a great improvement: I cannot break it now by typing fast, thank you so much! More information on the behavior in RDP session:
1. Right after connection, CapsLock in the remote session toggles case (not good). The toggle also starts working after minimizing-maximizing RDP screen. So, I have feeling that the AHK script somehow gets suspended or by-passed on switching/focusing to a maximized RDP session.
2. To make the script work again I exit full screen mode (restore down), hit the re-mapped combination (clicking CapsLock only doesn't help!) in RDP window mode, and then can maximize RDP window and the remap will work flawless, even in an inner RDP session!
- image.png (9.81 KiB) Viewed 1433 times
- image.png (31.71 KiB) Viewed 1433 times
3. When working with 2 screens where one of them shows full-screen RDP, changing focus (mouse click) from full screen RDP "suspends" the script again on the return to the full-screen RDP.