microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.23k stars 8.27k forks source link

Support fullscreening with Win+Shift+Enter #4760

Open xmha97 opened 4 years ago

xmha97 commented 4 years ago

Hello, I know this app will full-screen with Alt+Enter and F11 Please add a new keyboard shortcut for full-screen: Win+Shift+Enter Why?! Because all universal apps became full-screen with Win+Shift+Enter Thanks.

zadjii-msft commented 4 years ago

I suppose if other UWP apps use this keybinding, then we could too. The system already set a precedent that this key chord is used for that, so we could use it too, I don't feel bad about hijacking it in this case.

DHowett-MSFT commented 4 years ago

Yeah, I don't see why not.

abhijeetviswam commented 4 years ago

I was trying to work this out, however I found that currently there is no support for windows key modifier. Also based on comments in #4329, there's no plan to implement it.

I'm wondering how we can bring in this feature if the modifier cannot be added. Does the terminal support any win key based shortcuts right now?

zadjii-msft commented 4 years ago

Since Win+Shift+Enter is a system keybinding that's usually bound to fullscreen UWP applications, we can special-case that keybinding to fullscreen the Terminal, so it behaves like other apps on the system. It would not be a general-purpose "users can bind the Win key", it would be a one-off special case.

neville-nazerane commented 4 years ago

Powershell and command prompt have fullscreen on alt + shift + enter. How about staying consistent with them?

DHowett commented 4 years ago

Uh, powershell and command prompt have fullscreen on alt+enter. Terminal does too. It works today.

neville-nazerane commented 4 years ago

By habit from visual studio I always only tried alt + shift + enter. Never realized just shift + enter worked. Makes sense now, Thanks!

So basically, in that case, there is kind of a bug where holding an additional key doesn't work in the terminal but does in command prompt and powershell.

hessedoneen commented 3 years ago

Hello! Could I give this a shot?

zadjii-msft commented 3 years ago

@hessedoneen Sure, go for it!

With this one, I probably would skip adding this as a whole proper keybinding. The TerminalApp layer, where most other keybindings are handled, doesn't know anything about the win key. We might need to handle this up in IslandWindow, and cause that to trigger entering fullscreen mode.

zadjii-msft commented 3 years ago

Oh uh, this might be harder than I thought.

I thought it would be as easy as slapping

        { "command": "toggleFullscreen", "keys": "win+shift+enter" },

into defaults.json.

I'm not sure that we ever get the Win+Shift+Enter keystroke to our wndproc. That would certainly make this harder. We might need to follow-up internally to see where that keystroke is getting eaten by the OS, and see if we can let it still get passed to apps.

DragNovus commented 1 year ago

Hello, I know this app will full-screen with Alt+Enter and F11 Please add a new keyboard shortcut for full-screen: Win+Shift+Enter Why?! Because all universal apps became full-screen with Win+Shift+Enter Thanks.

Win+Shift+Enter is already in use https://defkey.com/what-means/win-shift-enter