Virtual Machine Connection not allowing hotkeys to fire

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
shaharprish
Posts: 2
Joined: 18 Jun 2020, 08:14

Virtual Machine Connection not allowing hotkeys to fire

Post by shaharprish » 18 Jun 2020, 08:24

I have a simple script (I want the win hot keys that switch desktop - #^Left and #^Right to work on the host machine and not be piped back to the virtual machine.)

Here's a deconstructed script that I am tryng to do:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
SetTitleMatchMode, 2

#WinActivateForce

#IfWinActive Virtual Machine Connection
#^Left::
MsgBox xxx
In this case, I would expect the msgbox to appear if the active window is the virtual connection (it's kind'a like Remote Desktop - showing you the Desktop of the virtual machine).

However, this does not work when the focused window is the actualy virtual machine connection. If I remove the #ifWinActive line for example, this will work as expected for all winsdows, but not when the Virtual Machine Connection is the active window.
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Virtual Machine Connection not allowing hotkeys to fire

Post by BoBo » 18 Jun 2020, 08:31

AFAIK you've to leave the VM fullscreen mode to make keys fire back at your local box (well, that's the standard for RDP) ...?
shaharprish
Posts: 2
Joined: 18 Jun 2020, 08:14

Re: Virtual Machine Connection not allowing hotkeys to fire

Post by shaharprish » 18 Jun 2020, 09:10

So there's no workaround? A way to have AutoHotKey affect it like other windows?
User avatar
ibieel
Posts: 216
Joined: 17 Oct 2021, 23:30

Re: Virtual Machine Connection not allowing hotkeys to fire

Post by ibieel » 13 Sep 2023, 20:40

BoBo wrote:
18 Jun 2020, 08:31
shaharprish wrote:
18 Jun 2020, 09:10
So there's no workaround? A way to have AutoHotKey affect it like other windows?
any solution? i have the same problem.
viewtopic.php?f=76&t=121383
Post Reply

Return to “Ask for Help (v1)”