IonicWind Software

Aurora Compiler => Coding Help - Aurora 101 => Topic started by: Haim on August 22, 2009, 08:18:11 AM

Title: detect the state of Insert key
Post by: Haim on August 22, 2009, 08:18:11 AM
Hello all,
How can I tell whetehr the keyboard is in insert or replace mode.
Getkeystate only report the press of the key but not the actual state.

Thanks for any help.
Haim
Title: Re: detect the state of Insert key
Post by: SnarlingSheep on August 22, 2009, 09:11:31 AM
GetKeyState also returns the state of toggle keys like Caps Lock in the low-order bit, but is Insert a toggle key?
Quote
The return value specifies the status of the specified virtual key, as follows:
If the high-order bit is 1, the key is down; otherwise, it is up.
If the low-order bit is 1, the key is toggled. A key, such as the CAPS LOCK key, is toggled if it is turned on. The key is off and untoggled if the low-order bit is 0.
Title: Re: detect the state of Insert key
Post by: Haim on August 22, 2009, 09:31:08 AM
When I press the insert key I get a result in which bit 0 is 1. On subsequent calls to getkeystate (without additional key presses the result is 0, and the toggle state is not known