18

I run an AWS Workspace in full screen view, and I have my various windows and applications spread across two large monitors in Extended Desktop mode. Works just fine. But how do I toggle over to my local desktop using some automated code or script? Alt-Tab merely cycles between open windows in the WS desktop, so this AutoHotKey command won't work:

SendKeys !{tab}

I know I can press the AWS WS hotkey Ctrl-Alt-Enter to quickly exit full-screen view and put me in a window. But even still, Alt-Tab merely cycles between open windows in the WS window and not among the local open windows. How do I jump out of that window by keyboard?

And, even worse, when I go back to full screen view, all my open windows have been re-arranged to fit in the window view. Full screen apps are still full screen-ish, but locked in at the restored window size. I have to click the restore button twice - once to restore down from the pseudo-full screen, and again to go back to true full screen. I'd rather toggle out while remaining in full-screen. Can it be done?

So, is there a hotkey I can script with AutoHotKey or some other facility? Or anything I can program in VB, JS or AHK to do that? I also note that the WS window does not respond to the normal Windows hotkeys (like Alt-Space for the control bar, Win+Arrow to snap/maximize windows, etc.) so I'm just looking how to get started.

TIA

EDITS: Because this question was closed as not being "code" related, I have clarified throughout that I am looking for a solution using code. Thank goodness it is a trivial matter to take the many helpful suggestions collected here and convert them easily to code in the language of your choice, just as I show above in the AutoHotKey code example that doesn't work. And the scripting of my "kludge" works if not an ideal coding solution:

CoordMode, Mouse, Screen
MouseMove 3199, 1060
Sleep, 250
Click
Send !{tab}`
PGilm
  • 2,262
  • 1
  • 14
  • 26
  • I have found a kludge. On a Win 8.1 box, with a progman add-on (forcing a Win 7-style taskbar) on dual monitors (with taskbar shown on both) I have found the local taskbar un-autohides on the secondary monitor (when I move my mouse to it), allowing access to local running program windows and the start key. This puts the local window above the AWS desktops. – PGilm Jul 17 '17 at 14:13
  • If you can provide additional details from AutoHotkey's Window Spy for the window title of the AWS Workspace, it should be possible to come up with something using `WinActivate`. – David Metcalfe Sep 08 '17 at 20:19
  • Since this question is now about the code, here it is, reflecting my above kludge: `CoordMode, Mouse, Screen // MouseMove 3199, 1060 // Sleep, 250 // Click // Send !{tab}` – PGilm Sep 25 '21 at 22:31
  • 1
    I just wrote a simple python script that enables you to use CAPS LOCK to de-focus the "Amazon Workspaces" window. https://github.com/dfavato/amazon-workspaces-defocus – Danilo Favato Jul 11 '23 at 17:03

11 Answers11

21

I found a way to switch running Windows 10

  • Open a new Desktop (WinKey + Ctrl + D)
  • Start Amazon Workspace there - in Full screen mode
  • To switch back to local desktop, open "About" pop up in AWS
    Now, click on WinKey + Tab .. this allows you to select different Desktops.
  • Switch to your Original Desktop
  • To switch back to AWS simply press WinKey + Tab again and select Desktop running AWS
General Grievance
  • 4,555
  • 31
  • 31
  • 45
Manfred Just
  • 511
  • 3
  • 3
  • 3
    I like it, Thx! Note, from the AWS "About" screen, `Ctrl+WinKey+ArrowKey` lets you go directly to the Desktop in the direction of the arrow. Also, be careful to switch back to AWS Desktop (over or on top of the "About" screen) without actually dismissing the the About dialog because then trying again doesn't work. – PGilm Mar 23 '20 at 16:42
  • 1
    Nice. This is going to save me a lot of swearing and headache, so I created a bounty that I can award. Thank you Manfred Just! – hmqcnoesy Mar 23 '20 at 17:10
  • This looks lika a great solution. Sadly, it doesn't works for me. I'm running a Win 10 instance in AWS Workspaces, so WinKey + Tab (or WinKey + Ctrl + Arrow) is mapped inside the VDI. – Armando Feb 11 '21 at 20:42
  • 2
    How do you open the "about" pop up when AWS is fullscreen? – Stevoisiak May 17 '21 at 16:56
  • 2
    It's not really mentioned above, but for this solution to be useful, you have to keep the About dialog open for the duration of the session. The dialog is opened manually by moving your pointer to the top of the screen and waiting for the Amazon Workspaces menu to come down. Then select "About Amazon Workspaces" from the "Amazone Workspaces" menu. – timblaktu Feb 22 '22 at 17:56
  • This is no good because the "About" dialogue stays on top of all other windows all the time. It blocks your window. – NeilG Nov 18 '22 at 00:16
5

I have a found an solution to this, not quite a hotkey but it does allow you to leave AWS fullscreen temporarily and have the window arrangement stay the same when you return.

  • bring mouse to the top of the screen so that the Amazon WorkSpaces menu bar appears.
  • click on Amazon WorkSpaces>About Amazon WorkSpaces. This will bring up the About Amazon WorkSpaces menu
  • click on either "Download Latest Client" or "Terms and Conditions" and this should bring you back to your local machine, though it will open an AWS website.
  • To return to AWS, simply click the client icon on your local system tray, though you will want to close the About Amazon WorkSpaces window first since if left open, it will not work the next time.
General Grievance
  • 4,555
  • 31
  • 31
  • 45
  • Pretty kludgy. Thx. My kludge is slightly better for me in Win 8.1, but for Win 10 machines, at least yours does work. Thx, – PGilm May 23 '18 at 17:10
  • Another thing, at least, you can use your technique to go to your native (underlying) desktop, and then while there launch a small ahk program (just a small floating (semi-transparent) button is all you need) and use Winset, Alwaysontop to make sure it stays above the full screen AWS, and there you go . . . – PGilm May 23 '18 at 18:21
  • 2
    I've found that once you go into the About Amazon WorkSpaces, and the modal pops up, you can Alt+Tab from there – Rob Taylor Jul 24 '18 at 12:43
  • 1
    Unfortunately this kludge, and many others suggested here, no longer work with the latest AWS client (3.0.2.1288). Looking for a new sol'n . . . – PGilm Feb 19 '20 at 15:15
  • 1
    As of 23-Mar-2020, with the current AWS client, see answer from @manfred-just which works (for now). – PGilm Mar 23 '20 at 16:45
4

Try this solution:

  1. Enable Automatically hide the taskbar in desktop mode.
  2. Disable Lock the Taskbar
  3. Enable Amazon WorkSpaces FullScreen.
  4. Now, when you point the mouse to the bottom of the screen, the TaskBar Local Desktop will appear.
  • This doesn't work for me (AWS client 3.0.0.1197 on Windows 7) – wi2ard Dec 18 '19 at 09:59
  • I found this didn't work with full screen mode but it may be a helpful idea for you if you can tolerate not being in full screen on AWS, or actually because you haven't found a shortcut to get out of the AWS desktop back to local. I additional used Settings > System > Multi-Tasking > Virtual Desktops to set "on the taskbar show windows that are open on All Desktops". Then when the taskbar un-hides in the AWS Desktop (not in full screen) then at least you can click directly on the application on your local that you want to switch to. – NeilG Nov 18 '22 at 01:18
4

Adding to Manfred Just's answer(which I found to be useful), You can do the following:

  • Running Windows 10
  • Open a new Desktop (WinKey + Ctrl + D)
  • Start Amazon Workspace there - in Full-screen mode
  • Use 4 fingers in the trackpad to switch between desktops (This works even if the focus is on the AWS Workspace)

Although this trick uses a trackpad, it still is better than clicking on the about button to get the window focus.

2

Three- and four-finger touchpad gestures are processed by the host rather than guest machine. E.g. three fingers left or right works like the host's Alt+Tab. (Win 10 on a notebook)

18446744073709551615
  • 16,368
  • 4
  • 94
  • 127
1

I have dealt with the same issue and it is very annoying. I'd use RDP in a heartbeat if I could but instead I wrote this script in AutoHotKey (AHK). I have found that AWS Workspaces captures the keyboard but could still get the mouse position so to minimize AWS in fullscreen or any program you simply swipe left on the top of the screen with your mouse and the program will minimize to the taskbar

Simply copy and paste the code below into a text editor, save as Slide Minimize.ahk, run and enjoy.

; Slide Minimize
; A handy tool for minimizing windows with a swipe mouse gesture
; Written By Travis Steichen

#NoEnv
SendMode Input 
SetWorkingDir %A_ScriptDir%
SetBatchLines -1
ListLines Off

CoordMode, Mouse, Screen

; Settings
global TopSlideArea := 16
global SlideDistance := 750
global SlideTime := 250

global TickRate := 10

global HelpMsg = ""
global State := "Waiting"
global CurrentSlideDistance := 0
global SlideLastX := 0

Menu, Tray, NoStandard
menu, tray, icon, C:\Windows\System32\SHELL32.dll,35
menu, Adjust Slide Minimize Sensitivity, add, Slide Activation Distance, GUI_SlideActivationDistance
menu, Adjust Slide Minimize Sensitivity, add, Slide Activation Time, GUI_SlideActivationTime
menu, Adjust Slide Minimize Sensitivity, add, Slide Activation Area, GUI_SlideActivationArea
menu, tray, add, Adjust Slide Minimize Sensitivity, :Adjust Slide Minimize Sensitivity
menu, tray, add ; Create a separator line.
menu, tray, add, About, HelpAbout
menu, tray, add, Reload Program, TrayReloadProgram
menu, tray, add, Exit, TrayExitProgram

SettingsLoad()

HelpMsg =
(
Slide Minimize
Version 1.0.0

Written By Travis Steichen
Email: travis@travissteichen.com

=== Instructions ===
Just move your mouse to the top of the screen and swipe somewhat fast and the window in focus will minimize
)

SetTimer, Tick, %TickRate%

#Z::

MsgBox, Ok...

return

;===============================================================================================================================================
;========    END    OF    AUTO    EXECUTE    ===================================================================================================
;===============================================================================================================================================
return


;===============================================================================================================================================
~^#F24::
; This does nothing other than prevent the script from existing as soon as it is started
return
;===============================================================================================================================================

SettingsLoad()
{
    if ( FileExist("Settings.ini") != "" )
    {
        iniSection := "Gestures"
        IniRead, TopSlideArea, Settings.ini, %iniSection%, TopSlideArea
        IniRead, SlideDistance, Settings.ini, %iniSection%, SlideDistance
        IniRead, SlideTime, Settings.ini, %iniSection%, SlideTime
    }
    else
    {
        SettingsSave()
    }

}

SettingsSave()
{
    iniSection := "Gestures"
    IniWrite, %TopSlideArea%, Settings.ini, %iniSection%, TopSlideArea
    IniWrite, %SlideDistance%, Settings.ini, %iniSection%, SlideDistance
    IniWrite, %SlideTime%, Settings.ini, %iniSection%, SlideTime
}

GUI_SlideActivationDistance:

msgCaption     := "Set Slide Activation Distance"
msgText        := "Slide Activation Distance is how many pixels the mouse must move left to minimize the current window in focus"
InputBox, SlideDistance, %msgCaption%, %msgText%,,,,,,,,%SlideDistance%
SettingsSave()

return

GUI_SlideActivationTime:

msgCaption     := "Set Slide Activation Time"
msgText        := "Slide Activation Time is how much time measured in milliseconds the mouse has to swipe left to minimize the current window in focus"
InputBox, SlideTime, %msgCaption%, %msgText%,,,,,,,,%SlideTime%
SettingsSave()

return

GUI_SlideActivationArea:

msgCaption     := "Set Slide Activation Area"
msgText        := "Slide Activation Area is how many pixels high from the top of the screen the mouse has to swipe left in minimize the current window in focus"
InputBox, TopSlideArea, %msgCaption%, %msgText%,,,,,,,,%TopSlideArea%
SettingsSave()

return

TrayExitProgram:

ExitApp

return

TrayReloadProgram:

Reload

return

HelpAbout:

HelpAbout()

return

Tick()
{
    MouseGetPos, mouseX, mouseY

    if ( mouseY < TopSlideArea )
    {
        if ( State == "Waiting" )
        {
            State := "Waiting For Slide"
            SetTimer, ResetSlide, %SlideTime%
            SlideLastX := mouseX
        }
        else if ( State == "Waiting For Slide" )
        {
            SlideDifference := SlideLastX - mouseX
            SlideLastX := mouseX

            if ( SlideDifference >= 0 )
            {    
                CurrentSlideDistance += SlideDifference

                if ( CurrentSlideDistance > SlideDistance )
                {
                    WinMinimize, A
                    ResetSlide()
                }
            }
            else
                ResetSlide()
        }
    }
    else if ( State != "Waiting" )
    {
        if ( State != "Reset" )
            ResetSlide()
        else
            State := "Waiting"
    }
}

ResetSlide()
{
    State := "Reset"
    CurrentSlideDistance := 0
    SetTimer, ResetSlide, OFF
}

HelpAbout()
{
    MsgBox, 64, Slide Minimize, %HelpMsg%
}

This is not a perfect solution but it fits my needs. Issues can occur with multiple monitors as Workspaces treats treats each monitor as a window in the task bar so when you slide minimize Workspaces in full screen you minimize the Workspaces window on that monitor. You can get around this by clicking the other screens and swipe minimize those. Also another issue is sometimes Workspaces forgets which monitor each workspace window is on which can cause more than one workspace window to appear on the same monitor which the only solution then is to switch Workspaces to full screen and back again.

Hope this is helpful

Wildcard
  • 11
  • 1
0

An alternative solution altogether is to use RDP client instead of the workspaces client. In my opinion this works much better anyways.

However, the administrator of the AWS account must enable RDP through the firewall.

https://aws.amazon.com/premiumsupport/knowledge-center/connect-workspace-rdp/

Rask
  • 417
  • 6
  • 9
  • 1
    Would that I could, but I can't. I wish I had RDP's floating toolbar allowing the minimization of the (full screen) window as RDP has . . . In the meantime, I've taken to running AWS in a Xubuntu VMWare full screen Unity app. Does everything I could desire!!! – PGilm Jan 04 '19 at 04:12
0

If you have an NVidia graphics card in your machine, set up the nView Desktop Manager, and enable multiple desktops. Load the nView toolbar, and set it so that it is always on top. In the toolbar, there are icons for the different desktops you have set up, and you just click on the desktop you want to switch to.

0

My solution: When in AWS Workspace, click Ctrl-Alt-Del to pop to the lock/restart/etc screen, click Task Manager: Your primary workstation task bar will appear at the bottom when the Task Manager window opens. Select any app/window from there and you've effectively brought the local desktop item forward, leaving the other AWS screens still showing.

0

This seems to work for me, but mostly because I am using laptop touchpad gestures.

Open the AWS in new desktop. After that, switch desktop by swiping 4 finger left and right.

Castro
  • 1
-1

I used AutoHotKey to map ScrollLock (NumLock works too) to get out of WorkSpaces. Change "Notepad" below to any other app that you have running on your host. The script will switch out of WorkSpaces to Notepad and then to the next app on the stack.

;Switch out of Amazon WorkSpaces to last window in tab stack

ScrollLock::
IfWinActive, Amazon WorkSpaces
{
    WinActivate Notepad
    Send, {ALT DOWN}{TAB}
    Sleep, 100
    Send, {TAB}
    Send, {ALT UP}
}
return
Premlatha
  • 1,676
  • 2
  • 20
  • 40
3ffem
  • 11