5

Usual Windows applications (e.g. Cygwin terminal) will open an upper-leftmost menu for resizing/moving/closing the window, by typing Alt+Space, which is very convenient because you don't have to leave your keyboard.

Now, How can I do the similar in a bash terminal window of Windows Subsystem for Linux ? (that is, I'd like to move/resize the window from keyboard) It doesn't respond to Alt+Space key sequence.

If there were no means to directly do that, any suggestions for alternatives are welcome.

phuclv
  • 26,555
  • 15
  • 113
  • 235

1 Answers1

4

When attached to Cmd, Windows Console (the terminal UX) intercepts many keys / chords to, for example, display its system menu if you hit ALT + SPACE.

However, when connected to WSL, Console intercepts almost no key chords at all because in the Linux world, Terminals traditionally do no work - all key strokes/chords are passed to the application (e.g. bash) for the app to decide what to do with.

If Console was to intercept ALT + SPACE to display the system menu, then Linux applications that require the user to use ALT + SPACE for some operation or other would fail to work, and there would be much gnashing of teeth. For example, when running emacs in Hyper which appears to be intercepting ALT + SPACE

HOWEVER, all is not lost. We are keen to figure-out a way to better handle keyboard mapping for a future release of Console. But this is a pretty large work item that's a little way down our backlog at present, so please be patient with us ;)

Update 2019-07-24

Alas, because Console's primary role is backward compatibility, we cannot add ALT + SPACE support to Console.

However, we do encourage you to download and use our new Windows Terminal which offers far more configuration options, including the ability to map many key chords, as well as better control colors, styling, background blur/transparency, etc.: https://github.com/microsoft/terminal

Please watch this playlist to see the Terminal's "sizzle video" and our deep-dive session from Build. enter image description here

Richard Turner
  • 1,919
  • 15
  • 15
  • Hurry it up, this is annoying. – spiralofhope Jul 17 '19 at 15:37
  • @spiralofhope Please read my update above. – Richard Turner Jul 24 '19 at 16:16
  • @RichardTurner : Thanks for the response . Please see a new ticket I opened just now https://superuser.com/questions/1482230/why-does-the-alt-space-keyboard-shorcut-not-work-on-windows-10-to-open-system. This is for chrome -- no ALT+SPACE. Notepad -- no ALT+SPACE either. What is happening ? – anjanbacchu Sep 13 '19 at 09:52
  • Please report issues directly on the Console/Terminal repo: https://github.com/microsoft/terminal - this is where the Console/Terminal team hang out and where you're most likely going to see a response. – Richard Turner Sep 18 '19 at 17:30
  • Most of the Windows GUI SSH clients have an option to map Alt+Space combination (among many others) for decades. See for example PuTTY. So of course you can add feature to override this. This is an essential feature, that should be easily accessible. And it is still missing. – Martin Dobšík Apr 06 '22 at 09:56
  • Desperately needed updates to Windows Console have been missing on Microsoft's backlog for close to quarter of a century (The feature set hasn't really changed since Windows NT until Windows 10). So now that Microsoft acknowledged that people do use Linux systems and they need to connect to them, it would be really appreciated if it would get quite high on priority list. – Martin Dobšík Apr 06 '22 at 10:06
  • As we've stated many times, Martin, we cannot make many changes to Windows Console without breaking many users, apps, tools, and scenarios. We urge users to adopt Windows Terminal which is modern, fast, and has a rich collection of features inc. multiple tabs & panes, and is the primary focus for our dev team. – Richard Turner Apr 28 '22 at 23:54