After experimenting with Kate and Kwrite simultaneously, I have confirmed my 
belief that there is no global INSERT mode for the entire console, X session 
or desktop session.  Apparently, applications that implement such a feature 
simply have their own bit, and code that toggles it upon receiving the 
keycode for the INSERT key.  The states are independent of each other, and 
some programs don't seem to bother with an insert state at all (konsole and 
kmail).
I would guess that most applications don't expose this state programmatically. 
You might have limited success trying to read the portion of the screen 
programmatically, although that would be easily defeated by some features 
like Kate's split windows, wild fonts, or language preferences (my insert 
state toggles between INS and SOB, not INS and OVR, because as I'm learning 
Spanish, I have my entire KDE environment switched to Spanish, and am using 
the US-Intl keyboard layout for the accents).  Also there are some 
applications that include text editor components but do NOT have 
insert/overstrike at all (like kmail's message compose window).
Wish I had a better answer for you, but as for a programmatic way to test the 
insert state, I'd say your chances of achieving this consistently AND 
portably are slim to none, unless it is your OWN program, and you can access 
the bit directly.
don't shoot, I am only the messenger!
tlj
El Dom 11 May 2003 03:37, Paul M Foster escribió:
> Anyone know of a programmatic way to test the state of "Insert" on a
> keyboard?
>
> Paul
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:41:53 EDT