Re: [gtkmm] changing key bindings (table navigation)



Am Mit, 2003-06-25 um 19.00 schrieb Peter Gasper:
> On Wed, 2003-06-25 at 10:47, Paul Davis wrote:
> > >How can one change the key behaviors within widget, ie. changing what the keys
> > > do?
> > >
> > >For example: 
> > >
> > >I have a table layout containing entry widgets. When the table has the focus
> > >left/right movement is with shift-tab/tab and up/down with up-arrow/down-arrow
> > >.
> > >During this movement the default text of each entry widget is highlighted when
> > > it has
> > >the focus. The left/right arrow will then move the cursor within the entry wid
> > >get.
> > >
> > >What I want is for navigation within the table to be all with the arrows. The 
> > >reason
> > >for this is navigation between various containers on screen (~4 of them) is wi
> > >th 
> > >the tab key, and I don't want the user to have to tab through some 96 widgets 
> > >in the
> > >table layout in order to tab out of the table and get to the next section of t
> > >he 
> > >screen. 
> > 
> > how do you propose to move the cursor within an entry or similar
> > widget?
> > 
> > the current code in GTK+ attempts to do "the best" thing, by using
> > arrows to navigate between focusable widgets except when the current
> > focus widget was felt to require internal navigation with arrow keys. 
> > 
> > you can override this in a key_release event handler, but its
> > moderately complicated, and will cause problems if any of the widgets
> > are entries and the user wants to navigate within them.
> 
> In this application the user won't need to navigate within the entry box
> (this requires left-right arrow which we need for navigation between
> entry boxes in the table) as it is only a 3 digit number. I am hoping to
> implement functionality where the user arrows to the entry box, and
> either types a replacement # (or hits enter to edit it and then types
> the #). We're still feeling out exactly how we want to do this.
> 
> Just so you know. This app will be running in an embedded system which
> may or may not have a keyboard. As a result, it must be easy for the
> user to navigate the app using only tab, arrow, enter, 0-9 and backspace
> keys; which are provided on the device. 


That is someting you can solve via the gtkbindings. But they are
completly not wraped in gtkmm. If you want to use them you have to go to
the underlying gtk+ and do it there. As far as i looked at it it's not a
big task this way.

I brought this up some month ago but hadn't the time to go in to the
deeps of gtkmm-wraping to do it on my own. Is someone allready working
on this?

cheers
detlef




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