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



On Thu, Jul 09, 1998 at 06:22:54PM -0400, Owen Taylor wrote:
> 
> matt <matt@cgibuilder.com> writes:
> 
[snip]
> > 
> > So you are saying that the key_press_event handler has to call
> > a function to insure that each keypress is handled like the user
> > thinks it should be? 
> > 
> > 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.
> 
> Basically, I don't think it is possible to write a VI
> binding without support from the widget. The binding setup
> is not a full language - it has no concept of variables or
> conditionals - so it cannot maintain an internal
> state. Without state, you don't have VI.
> 
Why not:
bind "<Esc>" (loadkeymap vicmd)
and in vicmd:
bind "i" (loadkeymap viins)

-- 
bobpepin@linux.lu



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