GMS 2 ALT+Enter not recognised, makes Windows ding.

Hey guys, what do you think might cause this code to:
a) not show the debug message, and
b) make Windows play a ding sound?

The code is in my objGameController's Step event. Cheers.

Code:
// toggle fullscreen
var altEnter = false;

// check for ALT+Enter - problem in here
if (keyboard_check_pressed(vk_alt))
{
    if (keyboard_check_pressed(vk_enter))
    {
        altEnter = true;
        show_debug_message("altEnter: " + string(altEnter));
    }
}

// check for f4 - this works fine
var f4 = (keyboard_check_pressed(vk_f4));

if (f4 || altEnter)
{
    window_set_fullscreen(!window_get_fullscreen());
}
 

JON213

Member
Last edited:
Top