I’ll be developing something for a Windows Mobile device using CompactFramework/C#. I wonder if there is some event available that can capture any user driven event (click, keypress, …) in context of the device. Sure, I could add some detection code in any of my click event handler for example but I assume that there hundreds of them.
So is there some event or windows mobile API related call that could help me out?
You can capture keyboard events device-wide via hooks (be aware that they are officially unsupported and so could disappear at any future release – though they’ve been there as long as I’ve been using CE, which is a long time). We actually added keyboard hook support to the latest version of the SDF if you’re after something pre-built or for code. Mouse events, however, are not hookable in CE unless you write a new touch panel driver.