Windowed Mode + Keys

I want to be able to move the game window with the windows keys, e.g. to move it to a different screen. Windows->(left, right, up, down) how do I get these commands to work?

I'm also confused by the fact that the games resolution stays the same when switching into full-screen but resizing works as expected (resolution changes with it).

Is there some simple setting I can make to have expected behaviour?

Those key combinations should work as long as you're not in exclusive fullscreen mode.

As for changing into fullscreen mode: if you want it to change the resolution at the same time, just Screen.SetResolution call instead.

Fantastic!

I started off with googling the problem and the solutions suggested some really weird things. I ended up with code like this (DO NOT DO THIS):

IEnumerator _FixResolutionFullscreen()
    {
        var currentResolution = Screen.currentResolution;
        Screen.fullScreen = true;
        PlayerPrefs.SetInt("full", 1);
        yield return null;
        yield return null;
        Screen.SetResolution(currentResolution.width, currentResolution.height, true);
    }

My current solution is this:

public void ToggleScreen()
    {
        if (Screen.fullScreen)
        {
            Screen.SetResolution(PlayerPrefs.GetInt("winw",800), PlayerPrefs.GetInt("winh",600), false);
        }
        else
        {
            PlayerPrefs.SetInt("winw", Screen.width);
            PlayerPrefs.SetInt("winh", Screen.height);
            var currentResolution = Screen.currentResolution;
            Screen.SetResolution(currentResolution.width, currentResolution.height, true);
        }
    }

The Windows Keys was another problem and not Unity's fault. I've learnt that my keyboard has a "gaming mode" toggled by a button. When the "gaming mode" is active, the windows-key is disabled.

It sounds like you're having some trouble getting your game window to move using the windows keys, and you're also confused by the way the resolution behaves when you switch to full-screen. If you're facing some troubles figuring out how to make these changes or get the behavior you want, it might be worth seeking out some additional help. You could consider posting about your problem on platforms like Reddit, where there are often help people who might be able to offer suggestions. It's also worth looking into the game's settings to see if anything might help you get the desired behavior.