This project has moved. For the latest updates, please go here.

Pass-through keystrokes - PrintScreen, Alt-Tab

Topics: User Forum
Jun 29, 2010 at 9:10 AM

Hi,

 

I am used to Microsoft's RDP client where keystrokes such as PrintScreen, Alt-Tab etc are not passed through to the remote terminal sessions.

 

Is it possible to exclude keystrokes from being sent over to the remote session?

 

 

Sep 20, 2010 at 9:54 PM

Bit late to the party, but I discovered Terminals recently and I ran into the same problem. I used Autohotkey to write a pretty inelegant but effective solution. It's a complete scrub because I couldn't work out a way to gracefully escape from the remote session (I run it in windowed mode, maximised to fill the whole window) so I used it to simulate a mouseclick on a part of the screen which always moves the focus off Terminals (beside the Start button in XP).

I actually think that the ability to pass through the keystrokes is a huge improvement on the vanilla mstsc, but there are times when not passing them through suits my workflow. It would be easy to write a toggle hotkey to turn these hotkeys on and off.

; PrintScreen from inside Terminals
#IfWinActive ahk_class WindowsForms10.Window.8.app.0.2e0c681
PRINTSCREEN::
SysGet, Mon, Monitor
ScreenHeight = %MonBottom%
CoordMode, Mouse, Screen
MouseGetPos HereX, HereY
MouseClick, left,  101,  ScreenHeight-13
Mousemove %HereX%, %HereY%
Send, {PRINTSCREEN}
return

;AltTab from Terminals to most recently used external window
#IfWinActive ahk_class WindowsForms10.Window.8.app.0.2e0c681
LAlt & TAB::
SysGet, Mon, Monitor
ScreenHeight = %MonBottom%
CoordMode, Mouse, Screen
MouseGetPos HereX, HereY
MouseClick, left,  101,  ScreenHeight-13
Send,  255{ALTDOWN}{TAB}{TAB}{ALTUP}
Mousemove %HereX%, %HereY%
return

It may or may not be of use!