I am trying to use Input to detect function and numpad keys as it detects other keys. Input presents two problems: 1) it does not detect function keys; and 2) it detects numpad keys as if they were normal number keys (i.e., Numpad0 is recorded as 0 rather than as Numpad0).
There is an workaround if the input string includes only one function or numpad key:
Code: Select all
Input, SingleKey, L1,{LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{Capslock}{Numlock}{PrintScreen}{Pause}{Numpad1}{Numpad2}{Numpad3}{Numpad4}{Numpad5}{Numpad6}{Numpad7}{Numpad8}{Numpad9}{NumpadDot}{NumpadDiv}{N;umpadMult}{NumpadSub}{NumpadAdd}
if (ErrorLevel <> "MAX")
{
; MsgBox Early: "%SingleKey%"
SingleKey := SingleKey . SubStr(ErrorLevel, 8, StrLen(ErrorLevel) - 7)
}
MsgBox "%SingleKey%"
using the above code with L2 instead of L1 exits with the first press of a function or a numpad key.
Thanks!