Message: previous - next
Month: November 2012

Re: [trinity-devel] Latest GIT (Alt key broken)

From: Darrell Anderson <humanreadable@...>
Date: Sun, 11 Nov 2012 21:47:03 -0800 (PST)
> I tested in 3.5.10 and pressing the Alt key, releasing,
> pressing the F key does not work. So this bug has been
> around a long time.
> Is this a bug? I tested directly in Xfce and sequential
> pressing of the keys does not work there. I'm starting to
> think this is a GTK problem, although Opera (Qt4) behaves
> the same way. Perhaps sequential key presses is supported
> only in Trinity apps?
> Where does one start looking to debug this?

Some investigating reveals that although standard in the Windows world, many 'nix based apps don't support this feature. In Trinity and KDE, the ability to highlight the menu bar by only pressing the defined accelerator key is a feature of Qt and is defined in $HOME/.qt/kstylerc:


True is the default and does not need to be explicitly set.

Changing that key value to false disables the accelerator key such that the accelerator key only works when pressed concurrently with a menu mnemonic key.

I tested the false value (requires restarting Trinity) and confirmed that pressing only Alt no longer selects the menu and pressing Alt along with a menu mnemonic (for example, Alt+F) still works as expected.

This configuration value is read in tdelibs/tdefx/kstyle.cpp.

I found a Firefox option that almost mimics this behavior:

ui.key.menuAccessKeyFocuses = true

The difference is in Trinity the first menu in the menu bar is selected but does not fully open, which allows using a respective mnemonic key in the menu bar to open the desired menu. In Firefox the entire first menu (File) is opened, which is kind of clumsy to then use a mnemonic key to select a different menu.

I haven't found a generic way to have all non Trinity apps behave the same way as Trinity apps when MenuAltKeyNavigation=true.

Does anybody know of a similar gtkrc option?