Re: Shift TAB and TAB binding

On Wed, 2003-05-14 at 12:37, Radek Doul�wrote:
> On Wed, 2003-05-14 at 18:18, Owen Taylor wrote:
> > On Thu, 2003-05-08 at 11:25, Radek Doul�wrote:
> > > Hi Owen,
> > > 
> > > I run recently into this problem. I am binding TAB key in gtkhtml. What
> > > happens is that this binding gets activated even if I press Shift TAB. I
> > > traced the problem to gdk_keymap_translate_keyboard_state in
> > > gdkkeys-x11.c where Shift modifier is consumed.
> > > 
> > > Any idea what's wrong or how to fix it?
> > > 
> > > It used to work some time ago. (maybe in gtk 1.4?) I am now using gtk
> > > 2.2.1. I have tried CVS version from yesterday which behaved the same.
> > 
> > Sounds like a problem with your keymap. GTK+ can't handle the case
> > where:
> >  
> >  The XKB extension is present
> >  Shift-Tab produces Tab rather than ISO_Left_Tab
> It probably produces ISO_Left_Tab, I was binding the same action to Tab
> and ISO_Left_Tab as well. And another to Shift Tab and Shift
> ISO_Left_Tab.
> So the way to handle Shift-Tab and Tab differently is to bind to Tab and
> ISO_Left_Tab. It's somewhat weird, but looks like XFree86 brokeness
> then.

No, it's really my "brokeness" rather than XFree86 brokeness. Systems
weren't consistent in the model for how Shift-Tab worked, so I had
to pick between one of two models and make the other systems look
like it:
 A) Shift+Tab produces ISO_Left_Tab the same way that Shift+a produces
 B) Shift+Tab produces Shift+Tab and ISO_Left_Tab never is produced.

I picked A) becuase that was what Linux+XFree86 systems did, but really
B) is more natural and with 20/20 hindsight it was the wrong choice.

> Thanks for you answer
> Radek
> BTW, why did the Shift-Tab binding work in 1.x gtk?

Rather Shift+ISO_Left_Tab worked in 1.x GTK+. GTK+-1.2.x didn't try
to determine what modifiers were "significant", so there were big
problems with keys like '+' that could be either shifted or unshifted.
gtk2 uses a more consistent model.


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