Re: How to know if "INSERT" is on/off from key-press-event



Gaurav Jain wrote:
Hi,

I need to do special handling for "key-press-event" in a GtkTextView
when some letter is entered while the "INSERT" mode is turned ON.  Is
there a way to know whether INSERT mode is ON or OFF at the time of
receiving a key-press for some other key (I cannot listen to key-press
event of INSERT key itself because my TextView may get created *after*
INSERT has already been pressed).
Hello,
Look at GtkTextView::overwrite_mode field, non-zero means that "insert" mode is on. There's also "toggle-overwrite" signal for this object which is activated by binding on <Insert> key.

        Olexiy




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]