Hi
i'd like to get the last key or key-combo pressed.
Windows API method is fine, or VBA.
Note: I need to get this several seconds AFTER they key is pressed. I do not care about the current state of the key. I'm not trying to run a macro in response to a keypress. So, getasynckeystate and OnKey are NOT the appropriate solutions for this. The key might be pressed while a macro is running, and i want to allow the macro to finish running without interruption, and only get the last key pressed after the key has already been released, possibly several seconds before.
I'm not trying to detect any specific key, just want to get last keypress, whatever key it was.
The method should be able to detect special keys, like home, end, left, right, down, and up.
It should also recognize key combinations, like control alt and shift.
Using Excel 2007.
Thanks!
also posted here:
excelforum.com/excel-programming-vba-macros/850033-how-to-get-last-key-or-key-combo-pressed-not-event.html