Re: [gtk-list] Re: New key-binding system



Quoting matt (matt@cgibuilder.com):
> example:  the user is in vi command mode in an entry widget.  
> if the user hits a 'l' i don't think the key_press_event handler 
> should be called.  
> 
> if it is called then the handler doesn't know if 
> the 'l' key was pressed in insert mode or command mode.
> 
> This is why i think the binding method should choose
> if and when all signals are sent out.

well how about this ... have a "state" flag in the entry ... and if the
state is instert (something that it would be for emacs bindings all the time)
it's handeled normally if the state is something else it's not caught in
key_press ... then when not in insert mode the user would bind the keys
with bind to the normal actions just like emacs bindings ... that would mean
about 3 lines in the keypress handler and one more field in the structure 
and you can make vi bindings ...

George



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