SA-MP Forums Archive
Block Alt-Enter - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Client Support (https://sampforum.blast.hk/forumdisplay.php?fid=16)
+--- Thread: Block Alt-Enter (/showthread.php?tid=678370)



Block Alt-Enter - j7n - 24.08.2020

The key combination sends the game into a windowed mode. I don't ever want to use it. Playing any game with a light desktop visible around it and a chance to lose focus is not useful. How could I completely disable this?

I have a problem with AutoHotkey scripts sending the game into windowed mode accidentally. This causes the display output to become corrupted, lose anti-aliasing, and usually require a restart.

In AutoHotkey I do something like the following. Just doing one SendInput {NumpadEnter} is enough to trigger the problem.

$>!0::
Sleep 300
BlockInput On
Sleep 100
SendInput t%Clear%/skin{NumpadEnter}
Sleep 400
; a dialog appears
SendInput %VehId%{NumpadEnter}
BlockInput Off
return

The combination is Alt-0. If I am still holding the Alt while an input without "t" is being sent, I will trigger the combination Alt-Enter. This happens if I have to reach across the keyboard or use two hands. I was unable to completely trap the key combination in AHK, nor programmatically release the Alt. Maybe you could give me a hint of how to find this command in samp itself to change to some non-existant combo?


Re: Block Alt-Enter - rt-2 - 24.08.2020

Why are you using 'NumpadEnter' if it's causing the problem, why not using 'Enter' instead?


Re: Block Alt-Enter - j7n - 25.08.2020

I believed, without thorough verification, that I had successfully worked around this problem because the keys are different to the underlying GTA. One can be set for jumping out of the car but not the other. Regular {Enter} of course causes the game to enter windowed mode as well.


Re: Block Alt-Enter - NaS - 25.08.2020

You could trigger the script on release of the alt key, or toggle off BlockInput when alt is released.


Re: Block Alt-Enter - j7n - 26.08.2020

Waiting for release of Alt seems to work so far. Time will tell if it reliably works when the key gets stuck.

KeyWait, Alt, L