It's too early to give a negative answer within the context of not using any
third-party product, but here are the results of my historical research,
which might help in advancing on this question.
The decision to make Alt-Tab extremely hard to intercept was taken in
Windows NT. The article describing what was done has disappeared from the
Internet, but I have found an old edition on the Wayback Machine,
dating from December 2003.
Because it's so hard to find, I reproduce it here as an image:
The three solutions listed by the Microsoft developers
(dating from the time when they still answered user queries) are :
- Modifying the Windows kernel, meaning Windows DLLs (I have no intention).
- Register for hotkeys via API function
which can only be done by injecting a DLL into the game
while executing, so can get you seriously banned for life.
- Create a system-wide keyboard hook, like AutoHotKey does,
which you say can also get you banned.
If we can believe the original developers of NT, these are the
only options, of which the only realistic solution involves
a program such as AutoHotKey.
From my side I can see no other solution, but perhaps someone
else knows about some other clever hack.
An AutoHotKey script to disable Alt-Tab is :
#IfWinActive Counter-Strike: Global Offensive
LAlt & Tab::
You should put the right title on the
for Alt-Tab to only be disabled while the game has the focus.
For games that use a low-level access to the keyboard, the script
might need to be Run as Administrator.