poush / H2

Supporting light weight extensions for heavy task lifting
MIT License
16 stars 32 forks source link

Add a hot key to make it full screen and vice-versa #23

Closed poush closed 5 years ago

poush commented 5 years ago

A key combination, most probably, option/alt+ shift + f or any better which doesn't coincide with system and browser keys. Pressing this combination will make the screen show in full screen and again will make it resize to original size and position.

ghost commented 5 years ago

@poush I'd like to take a swing at this.

Some clarification questions: 1) In testing the apps I happened to have on this machine, the only I saw using CTRL+SHIFT+F were other electron apps like Discord and Slack, it mapped over to maximize. In that case, should I use control/command + shift + f to match that convention or use alt + shift + f to avoid conflict if player is not focused?

2) If Alt, how should Mac be addressed? Electron doesn't expose a OptionOrAlt like it does CommandOrControl, so should I utilize Alt in all cases or do alt for windows/linux and option for Mac?

3) Are we talking about true full screen or just maximize?

poush commented 5 years ago

Thanks for your interest.

  1. The issue is that we assume that our app is always on focus (always on top). To perform any actions we don't want the user to first focus it. Similarly, different keys for focused and unfocused situations could be confusing. So from these two combinations, I would suggest for Alt+shift+f to avoid conflicts and please let me know if you have a better key combination in your mind.

  2. I think using Alt would be sufficient to work on all platforms. Here's a quote from docs Use Alt instead of Option. The Option key only exists on macOS, whereas the Alt key is available on all platforms.

  3. Here, I would suggest full screen because if you see the use case of the picture to picture mode (which has a resizable screen), it would make sense if we have the full-screen option. Let me know if you have other views on it.