Is there a way to tell which Enter key was pressed? Does that require a low-level driver or something similar? Does the OS know which Enter was pressed?
I'm on Windows and I tried Carnac but it only tells me if Enter was pressed or not.
Is there a way to tell which Enter key was pressed? Does that require a low-level driver or something similar? Does the OS know which Enter was pressed?
I'm on Windows and I tried Carnac but it only tells me if Enter was pressed or not.
If you're referring to the number pad, scripts in AutoHotkey will trigger/detect separately for Enter and for NumPadEnter
Depending on what you want to do, you can trigger on these separately but allow the keystroke to go through to the original application by utilizing a tilde in front of the hotkey definition, and then take a follow-up action on the side (in parallel) with the keystroke being sent to the application (send a message, log somewhere, etc.)
As far as I know, both enter keys have the same scan code (VK_RETURN). I think that the numpad key can be determined by checking the lParam from e.g. a WM_KEYDOWN message.
Numpad keys are probably going to set the "extended" bit (bit 24) to a value of 1. So an AND operation (lParam & x1000000) would test that bit.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646280(v=vs.85).aspx
That is how Windows sees it, but it may not be exposed in many hotkey-style programs.