trapping FN key
Currently, on my device, to enter numbers using the QWerty keyboard, i have to press the function key each time, as there is no NumLock function available.
So i thought i might be able to simulate this by implementing the following rule:
-create a background process that will determine if the function key is pressed twice quickly
-if so, i set a private property, _numLock = true;
-if the FN key is pressed twice again, i set _numLock = false;
-basically, i would like to have a process recieve all keystrokes, if _numLock = true, i can then pass the keystrokes on, but also set what ever needs to be set to indicate the FN key is pressed.
i thought this article my Alex might be along what i need to do:
http://blog.opennetcf.org/ayakhnin/PermaLink.aspx?guid=6f3656ec-b669-4a23-987a-a2455fbd2fc4
BUT, i am unable to find the Microsoft.WindowsCE.Forms library?
does anyone know where that is and do you think what i am intending to do will work?
[1208 byte] By [
farseer] at [2008-3-3]
well as is usually the case, i could have tried harder...found it by doing a partial search on my system...
i am guessing for a system running Pocket PC 2003, i would need the CompactFramework v1.0 file
i am able to trap the FN and other keys, but for some reason, it seems like doing so kills the processing of the message. for instance i register the "1" key on the QWerty keyboard as follows:
| | RegisterHotKey( this.Hwnd, 49, 0, 49 ); (note: i am using 0 (none) for modifier, because it seems for input from the QWerty keyboard, 8(windows) does not work)) |
This does indeed cause the WindProc routine to be invoked. in that routine, the very last thing done is to forward the message onto the base class' WndProc routine:
but this doesn't seem to do anything. For instance when i am typing "1" in a textbox, the above code implies the default handler will be called and a 1 should be printed in the textbox...but that is not what is happening, no "1" is printed out.
I have even gone so far as to comment all code out of the WndProc i override and just leave the line above...to no avail.anyone have a clue as to what may be causing this?