1) Does conin stands for console input ?
Yes. (Exactly as noted in the batch code.)
3) Is the technique available for public?
Everything noted in the source code. It's GCC specific. The underlying __start routine will be overridden.
2) Is it possible to have a timer, so that if no input is given within a specified amount of time conin.exe will close itself?
@echo off &setlocal EnableDelayedExpansion
:: conin.exe - Read Console Input
:: timeout: %errorlevel% = 0
:: type: %errorlevel%>>29 (0=keyboard, 1=left click, 2=right click, 3=mouse move)
:: key: %errorlevel% (either character code or (for extended keys) 256 + key code)
:: mouse: row = (%errorlevel%>>14)&0x3FFF, column = %errorlevel%&0x3FFF
:: the utility times out after the passed number of milliseconds, it will wait infinite if you don't pass an argument
for /l %%i in () do (
set /a "key=!errorlevel!, type=key>>29, y=(key>>14)&0x3FFF, x=key&0x3FFF"
if !key! == 0 (
) else if !type!==1 (
echo mouse left x=!x!, y=!y!
) else if !type!==2 (
echo mouse right x=!x!, y=!y!
) else if !type!==3 (
echo mouse move x=!x!, y=!y!
) else (
echo keyboard !key!