With the release of KiXtart 2001 there is another solution - KBHit()

This is similar to the original solution, rewritten with KBHit(). If you don't want the count down, leave out the lines marked "; Countdown"
code:
? "Hit any key to cancel: "
$iTimer=15
While KBHit()==0 AND $iTimer
$iTimer ; Countdown
sleep 1
If $iTimer > 9 Chr(8) Endif ; Countdown
Chr(8) " " Chr(8) Chr(8) ; Countdown
$iTimer=$iTimer-1
Loop
Get $sKeyHit

The $sKeyHit is set to the first key pressed.