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



George wrote:
> 
> 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 ...


That is kind of what i was thinking except there needs to be a way to
handle 
when the user hits the <esc> key.    in this case if the user is in
insertmode
then they drop to command mode.  BUT, if they are in command mode the
<esc>
is sent to the handler.    NOTICE  this is differnt then the example
above, which
is why i think i have problems with the proposed methodology.

--matt wimer



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