Control + W closes my game?


Im working on an fps game and Control being the crouch key and with WASD movement whenever I press Control + W it closes my game, is there anything I can do to bypass this aside from changing the controls?

I saw someone with this issue once
I remember it was shortcut in gdevelop so if you build your game or play it in browser it won’t close
Yet if you click icon in upper left go to file > preferences
You can hit on top shortcuts tab
Maybe you can disable it there
If that don’t help and you need ctrl+w in preview i can teach you how to make AutoHotKey script to prevent that

1 Like

someone gave me a javascript that helps with this so Ill just keep my post up and share the javascript so that it might help people

document.addEventListener(‘keydown’, function(event) {
// Check if Ctrl key is pressed and the ‘W’ key is pressed
if (event.ctrlKey && event.key === ‘w’) {
// Prevent the default action (closing the window)
event.preventDefault();
}
});

hi do you still have a problem with it? I know how to solve it. Just go to “files” then “preferences” and then “keyboard shortcuts” and there it is.