Block certain hotkey inside windows remote desktop?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
alesyt0h
Posts: 214
Joined: 28 Jan 2015, 20:37

Block certain hotkey inside windows remote desktop?

24 Jan 2019, 12:17

Hello guys.

I have a program which is Listar in my computers, it's a program of easy search through the files you have in your computer, for fast access, there's a hotkey in the program which is pressing twice the control key for a popup search bar. The problem is when I fire that hotkey while I'm in a remote desktop session, because it launches 2 of these bars, one of the host, and the other in the client ( the rdp session ) and it's really annoying and confusing.

How can I prevent with authotkey to prevent sending the twice press of control key in my host computer and only send it in the rdp session ?

Thank you very much
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: Block certain hotkey inside windows remote desktop?

24 Jan 2019, 17:55

A_ComputerName ?? ; The name of the computer as seen on the network.
alesyt0h
Posts: 214
Joined: 28 Jan 2015, 20:37

Re: Block certain hotkey inside windows remote desktop?

24 Jan 2019, 18:12

dont think that will work :/ A_ComputerName will get the name of my computer which is running the script.
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: Block certain hotkey inside windows remote desktop?

28 Jan 2019, 15:56

I do not understand that.
you have two PC then.
on is virtual and one is host.

you could seperatly install autohotkey on each computer.

scenario 1:
you have same hotkeys at both machines.
run a hotkeys at host runs also a hotkey at romote. right?
thats the problem?

you need a distinctive feature.
computername?
something else?
what could that be?
alesyt0h
Posts: 214
Joined: 28 Jan 2015, 20:37

Re: Block certain hotkey inside windows remote desktop?

29 Jan 2019, 21:24

Yes, that is the problem. I have the same program in both computers and the hotkey fires both, I tried with something like

Code: Select all

#IfWinActive ahk_class TscShellContainerClass
	LCtrl::
Return
Is working to not fire the program in the main computer, but then the control key is obsolete in the RDP Session and I cannot even do ctrl+c

Sorry if I'm explaining badly on this
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: Block certain hotkey inside windows remote desktop?

30 Jan 2019, 03:32

alesyt0h wrote:
29 Jan 2019, 21:24
Yes, that is the problem. I have the same program in both computers and the hotkey fires both, I tried with something like

Code: Select all

#IfWinActive ahk_class TscShellContainerClass
	LCtrl::
Return
Is working to not fire the program in the main computer, but then the control key is obsolete in the RDP Session and I cannot even do ctrl+c

Sorry if I'm explaining badly on this
exit the main script if TscShellContainerClass is active?
alesyt0h
Posts: 214
Joined: 28 Jan 2015, 20:37

Re: Block certain hotkey inside windows remote desktop?

30 Jan 2019, 04:34

SL5 wrote:
30 Jan 2019, 03:32
alesyt0h wrote:
29 Jan 2019, 21:24
Yes, that is the problem. I have the same program in both computers and the hotkey fires both, I tried with something like

Code: Select all

#IfWinActive ahk_class TscShellContainerClass
	LCtrl::
Return
Is working to not fire the program in the main computer, but then the control key is obsolete in the RDP Session and I cannot even do ctrl+c

Sorry if I'm explaining badly on this
exit the main script if TscShellContainerClass is active?
Nope, because the hotkey its not created by autohotkey, it's created by the program.
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: Block certain hotkey inside windows remote desktop?

30 Jan 2019, 04:58

alesyt0h wrote:
30 Jan 2019, 04:34
SL5 wrote:
30 Jan 2019, 03:32
alesyt0h wrote:
29 Jan 2019, 21:24
Yes, that is the problem. I have the same program in both computers and the hotkey fires both, I tried with something like

Code: Select all

#IfWinActive ahk_class TscShellContainerClass
	LCtrl::
Return
Is working to not fire the program in the main computer, but then the control key is obsolete in the RDP Session and I cannot even do ctrl+c

Sorry if I'm explaining badly on this
exit the main script if TscShellContainerClass is active?
Nope, because the hotkey its not created by autohotkey, it's created by the program.
disable all of this hotkeys in main PC? if remote is active?
yourHotkey::
; do nothing
return
alesyt0h
Posts: 214
Joined: 28 Jan 2015, 20:37

Re: Block certain hotkey inside windows remote desktop?

30 Jan 2019, 05:28

SL5 wrote:
30 Jan 2019, 04:58
disable all of this hotkeys in main PC? if remote is active?
yourHotkey::
; do nothing
return
Nope, that's what my script that I've tried is doing with LCtrl, it has to be that key. And as I said, it works to not fire the "program" in the RDP Session, but then it blocks the use of that key in everything on the RDP Session, like copy, paste .. anything that implies LCtrl
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: Block certain hotkey inside windows remote desktop?

30 Jan 2019, 05:55

alesyt0h wrote:
30 Jan 2019, 05:28
SL5 wrote:
30 Jan 2019, 04:58
disable all of this hotkeys in main PC? if remote is active?
yourHotkey::
; do nothing
return
Nope, that's what my script that I've tried is doing with LCtrl, it has to be that key. And as I said, it works to not fire the "program" in the RDP Session, but then it blocks the use of that key in everything on the RDP Session, like copy, paste .. anything that implies LCtrl
Send then a compicate seldom Shortcut to the Remote and redecode it there?
alesyt0h
Posts: 214
Joined: 28 Jan 2015, 20:37

Re: Block certain hotkey inside windows remote desktop?

30 Jan 2019, 06:02

SL5 wrote:
30 Jan 2019, 05:55
alesyt0h wrote:
30 Jan 2019, 05:28
SL5 wrote:
30 Jan 2019, 04:58
disable all of this hotkeys in main PC? if remote is active?
yourHotkey::
; do nothing
return
Nope, that's what my script that I've tried is doing with LCtrl, it has to be that key. And as I said, it works to not fire the "program" in the RDP Session, but then it blocks the use of that key in everything on the RDP Session, like copy, paste .. anything that implies LCtrl
Send then a compicate seldom Shortcut to the Remote and redecode it there?
Sorry, I got lost, wdym ?
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: Block certain hotkey inside windows remote desktop?

30 Jan 2019, 08:28

alesyt0h wrote:
30 Jan 2019, 06:02
SL5 wrote:
30 Jan 2019, 05:55
alesyt0h wrote:
30 Jan 2019, 05:28
SL5 wrote:
30 Jan 2019, 04:58
disable all of this hotkeys in main PC? if remote is active?
yourHotkey::
; do nothing
return
Nope, that's what my script that I've tried is doing with LCtrl, it has to be that key. And as I said, it works to not fire the "program" in the RDP Session, but then it blocks the use of that key in everything on the RDP Session, like copy, paste .. anything that implies LCtrl
Send then a compicate seldom Shortcut to the Remote and redecode it there?
Sorry, I got lost, wdym ?
example:
send,^+!1 from host.
to remote
then send, ^c inside remote to itself

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: hugojans and 100 guests