By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 1701 - No menu accelerators in the konsole menu bar
Summary: No menu accelerators in the konsole menu bar
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdebase (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: Other Linux
: P5 normal
Assignee: Michele Calgaro
URL:
Depends on:
Blocks:
 
Reported: 2013-11-07 12:32 CST by Darrell
Modified: 2013-11-16 08:53 CST (History)
5 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
Patch to add accelerators (underlines) to konsole main menu bar (1.08 KB, patch)
2013-11-07 13:16 CST, Darrell
Details | Diff
tdebase Konsole menu accelerator patch (10.95 KB, patch)
2013-11-12 01:31 CST, Michele Calgaro
Details | Diff
new patch (10.94 KB, patch)
2013-11-13 06:37 CST, Michele Calgaro
Details | Diff
updated patch (11.10 KB, patch)
2013-11-13 23:50 CST, Michele Calgaro
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darrell 2013-11-07 12:32:21 CST
Unlike other TDE apps, the Konsole menu bar does not display menu accelerators. Strangely, the sub menus do.
Comment 1 Darrell 2013-11-07 13:16:56 CST
Created attachment 1597 [details]
Patch to add accelerators (underlines) to konsole main menu bar

The patch works for me. Please test!
Comment 2 Michele Calgaro 2013-11-08 08:46:55 CST
I tested the patch. Works great. Well done!
Comment 3 Darrell 2013-11-08 12:53:11 CST
Thanks. Patch pushed to git in commit fd2f0b36.
Comment 4 Michele Calgaro 2013-11-09 07:06:01 CST
I think I now understand the reason why Konsole add no accelerator keys fir the main menu.
Try to use Midnight Commander from the Konsole with the accelerator keys enable. Common commands as Alt+S and Alt+T now brings up the respective menu instead of being handled by MC.

As I guess most of TDE users use MC in a Konsole, I propose to revert the patch. What do you think?
Comment 5 Michele Calgaro 2013-11-09 09:11:19 CST
(In reply to comment #4)
> I think I now understand the reason why Konsole add no accelerator keys fir the
> main menu.
That should have been 'why Konsole had no accelerator keys'...
Comment 6 Michele Calgaro 2013-11-09 09:26:17 CST
Also ALt+H and Alt+Shift+H don't work any more :(
Comment 7 Darrell 2013-11-09 11:49:40 CST
Sigh. :-)

Options/work-arounds:

* Revert the patch.

* Improve the patch.

* Change the konsole Help accelerator key (inconsistent with other TDE apps).

* Teach users to hide the menu bar before pressing Alt-H (I tested, this works).

Notes:

KDE4 konsole supports accelerators. There is a configuration option to toggle the accelerators.

KDE4 konsole has a built-in shortcut for toggling the menu bar (Ctrl+Shift+M).

Trinity inherited a clunky method for toggling the menu bar:

* From the Settings menu, select Hide Menubar (doable with the keyboard).

* "Right-click" in the konsole window to activate a popup menu and select Show Menubar. Not intuitive, not doable with the keyboard).

My desire for accelerators stems from my usage of Bookmarks. I have a nice long list and without accelerators I have to use the mouse to use the bookmarks.

My thoughts:

* Temporarily revert the patch (boo-hoo!).
* Add a configuration option to enable/disable accelerators.
* Add a keyboard shortcut to toggle the menubar (Ctrl+Shift+M).

I'm not a C++ hacker like you folks and I would need help. :-)
Comment 8 Slávek Banko 2013-11-09 19:45:31 CST
This bug report I had not noticed before, than I saw pushed patch in GIT. And the very first thing I thought was that this could mean conflict with applications in the Konsole... and that's the thing that I always very angry whenever I had to use GNOME and GNOME Terminal.

I personally have the menu always turned off, but I fully understand that this will annoy most other users :)

(Odpověď na komentář #7)
> Sigh. :-)
> 
> Options/work-arounds:
> 
> * Revert the patch.
> 
> * Improve the patch.
> 
> * Change the konsole Help accelerator key (inconsistent with other TDE apps).
> 

In this way, it can not be solved => other languages ​​use other accelerators.

> * Teach users to hide the menu bar before pressing Alt-H (I tested, this
> works).
> 

It would be hard to explain the user that the accelerators in Konsole gives him an advantage :)

> Notes:
> 
> KDE4 konsole supports accelerators. There is a configuration option to toggle
> the accelerators.
> 
> KDE4 konsole has a built-in shortcut for toggling the menu bar (Ctrl+Shift+M).
> 
> Trinity inherited a clunky method for toggling the menu bar:
> 
> * From the Settings menu, select Hide Menubar (doable with the keyboard).
> 
> * "Right-click" in the konsole window to activate a popup menu and select Show
> Menubar. Not intuitive, not doable with the keyboard).
> 

The default keyboard shortcut Ctrl+Alt+M is used to activate the menu - even if it was hidden.

> My desire for accelerators stems from my usage of Bookmarks. I have a nice long
> list and without accelerators I have to use the mouse to use the bookmarks.
> 
> My thoughts:
> 
> * Temporarily revert the patch (boo-hoo!).
> * Add a configuration option to enable/disable accelerators.
> * Add a keyboard shortcut to toggle the menubar (Ctrl+Shift+M).
> 
> I'm not a C++ hacker like you folks and I would need help. :-)

Proposed Ctrl+Shift+M unfortunately conflicts in MC. I do not know how difficult it is to implement a configuration option to enable/disable accelerators. Revert patch appears now to be the fastest solution.
Comment 9 Slávek Banko 2013-11-09 19:48:56 CST
(Odpověď na komentář #6)
> Also ALt+H and Alt+Shift+H don't work any more :(

Now you also fully understand how crucial it was for me bug 1676 :)
Comment 10 Darrell 2013-11-09 21:50:32 CST
I reverted the patch in commit 183530f3.

With that done, I am asking for a two-point compromise.

First, add a General configuration option to 'Enable menu accelerators'. The default would be disabled/off. Having that option should satisfy all users.

Enabling the accelerators introduces certain conflicts discussed here, which leads to the second point.

I notice no conflict with Midnight Commander when the Konsole menubar is hidden. If we add a keyboard shortcut to toggle the konsole menubar that would provide relief for those who want menu accelerators enabled.

The What's This help tooltip for 'Enable menu accelerators' would explain the potential conflicts and that the only work-around is to hide the menu bar when using console based apps with conflicting shortcuts. For example:

General tab

| | Enable menu accelerators

What's This Tooltip

Most Trinity apps use menu accelerators to use menus from the keyboard. Konsole is a unique app that has the menu accelerators disabled as the default. The reason is many console based apps use keyboard shortcuts and the Konsole menu accelerators conflict with those console based app shortcuts. Midnight Commander is a prime example. To those users who want Konsole menu accelerators and want to avoid conflicts with console based app shortcuts, the recommended work-around is to hide the Konsole menu bar when using console based apps with conflicting shortcuts.
Comment 11 Michele Calgaro 2013-11-09 22:42:07 CST
> First, add a General configuration option to 'Enable menu accelerators'. The
> default would be disabled/off. Having that option should satisfy all users.
This sound like a good idea

> I notice no conflict with Midnight Commander when the Konsole menubar is
> hidden. If we add a keyboard shortcut to toggle the konsole menubar that would
> provide relief for those who want menu accelerators enabled.
This is also a good idea, regardless of point 1. I wonder why such shortcut hasn't been made available
Comment 12 Timothy Pearson 2013-11-09 23:11:46 CST
I'm going to have to agree here...menu accelerators are a bad idea in a terminal window that will likely run applications that use their own "accelerators" (i.e. control key sequences).  Please revert the patch.
Comment 13 Darrell 2013-11-10 00:46:27 CST
>Please revert the patch.
Already done: refer to comment 10.

>menu accelerators are a bad idea
Please read my proposal in comment 10. :-)
Comment 14 Darrell 2013-11-10 01:18:42 CST
Note: The KDE4 Konsole and Xfce Terminal support toggling menu accelerators. KDE4 Konsole supports a shortcut to toggle the menubar while the Xfce Terminal toggles the menubar the same way as Trinity --- with the mouse.
Comment 15 Slávek Banko 2013-11-10 04:46:30 CST
(Odpověď na komentář #10)
> I notice no conflict with Midnight Commander when the Konsole menubar is
> hidden. If we add a keyboard shortcut to toggle the konsole menubar that would
> provide relief for those who want menu accelerators enabled.
> 

Hiding / displaying menu has one small drawback - resizing the window for the applications. Frequent toggle menu visibility also does not seem as user-friendly solution.

Configuration option to enable / disable accelerators for me seems as only way to solve this.
Comment 16 Darrell 2013-11-10 09:36:52 CST
>Hiding / displaying menu has one small drawback - resizing the window for the
>applications. Frequent toggle menu visibility also does not seem as
>user-friendly solution.
Hiding the menubar already exists --- we just don't have a nice keyboard shortcut. KDE4 uses Ctrl+Shift+M. If that shortcut conflicts with MC then we could try Ctrl+Alt+M. Trinity-Amarok uses Ctrl+M. I'm sure whatever shortcut is used will conflict with some kind of console app, even if not MC. In my testing with toggling the menubar, the nominal resizing did not bother me. I had not even noticed until reminded.

The only people who think about any of this are those who want accelerators. They have to take two explicit steps to use them seamlessly: 1) manually enable them in the Konsole settings and 2) manually hide the menubar as necessary to avoid shortcut conflicts. Every other user just ignores the whole deal. :-)
Comment 17 Michele Calgaro 2013-11-10 22:25:18 CST
I will work on this bug this week, when I have enough free time.
I am looking to add both options suggested by Darrell. With them, each user would be able to select their preferred setup, while the default configuration would remain "accelerators off" and "menu bar visible".
Comment 18 Michele Calgaro 2013-11-11 05:40:12 CST
While looking at this bug, I noticed that a shortcut to show/hide the menu bar already exists, even though it doesn't have any default key associated to it.
In Konsole -> Settings -> Configure shortcut... -> Show Menu bar entry.
After associating a shortcut to this action (for example Ctrl+Shift+Alt+M), it works both way (show and hide).

So the only thing left to do is to add an option to enable/disable the main menu accelerator keys.
Also if there is nothing against it, I will make 'Ctrl+Shift+Alt+M' the default shortcut for 'Show Menu bar'. Hopefully this sequence of keys minimizes the risk of conflicts with application run inside Konsole. 
If you are aware of any application that uses 'Ctrl+Shift+Alt+M', please let me know and I will look at a difference sequence (suggestions are welcome as well)
Comment 19 Darrell 2013-11-11 08:57:54 CST
What combinations of 'Ctrl'+'Shift'+'Alt'+M conflict with MC?

There is an 'Activate Menu' shortcut with an assignment of Alt+Ctrl+M. I am unable to get that shortcut to do anything.
Comment 20 Slávek Banko 2013-11-11 09:26:56 CST
(Odpověď na komentář #19)
> What combinations of 'Ctrl'+'Shift'+'Alt'+M conflict with MC?
> 
> There is an 'Activate Menu' shortcut with an assignment of Alt+Ctrl+M. I am
> unable to get that shortcut to do anything.

For me Ctrl+Alt+M works correctly. After pressing the keyboard shortcut the menu is opened. If menu is not displayed, then first appear and then is opened.

Ctrl+Alt+Shift+M seems to be not conflict.
Comment 21 Darrell 2013-11-11 10:40:05 CST
>For me Ctrl+Alt+M works correctly.
I found the problem: a stale assignment in khotkeysrc.

>Ctrl+Alt+Shift+M seems to be not conflict.
'Ctrl+Alt+Shift' is a finger twister on some keyboards. What combinations of *+M are used in MC? I presume the new shortcut will be reassignable?
Comment 22 Slávek Banko 2013-11-11 10:50:40 CST
(Odpověď na komentář #21)
> >For me Ctrl+Alt+M works correctly.
> I found the problem: a stale assignment in khotkeysrc.
> 
> >Ctrl+Alt+Shift+M seems to be not conflict.
> 'Ctrl+Alt+Shift' is a finger twister on some keyboards. What combinations of
> *+M are used in MC? I presume the new shortcut will be reassignable?

For me, the MC responds to Ctrl+M and Ctrl+Shift+M.
And of course i Shift+M ;)

No reaction I observe on the Alt+M (it did not seem to be a suitable combination) and Alt+Shift+M.
Comment 23 Michele Calgaro 2013-11-12 00:54:52 CST
> >Ctrl+Alt+Shift+M seems to be not conflict.
> 'Ctrl+Alt+Shift' is a finger twister on some keyboards. What combinations of
> *+M are used in MC? I presume the new shortcut will be reassignable?

'Ctrl+Alt+Shift' is a little awkward indeed, but I think it is wiser to avoid key combinations that only use Ctrl, Shift or Alt because such combinations may be used by programs run inside Konsole. Such weird combination should minimize the risk of conflicts with other programs' shortcuts.
The shortcut is reassignable anyway.

The alternative is to leave the shortcut without a default combination as it has been so far.
Comment 24 Michele Calgaro 2013-11-12 01:31:40 CST
Created attachment 1628 [details]
tdebase Konsole menu accelerator patch

This patch provides the following.

1) The keyboard shortcut for 'Show/Hide menu bar' is defaulted to 'Ctrl+Shift+Alt+M'.
If you prefer another combination, you just need to change one line before committing to GIT

2) Provide a check box 'Enable/disable main menu accelerator keys' in Konsole -> Configure Konsole... to enable/disable the main menu accelerator keys.
Comment 25 Darrell 2013-11-12 14:46:48 CST
Michele the patch works fine for me. Good job! :-)

One comment:

AS IS:

Enable/disable main menu accelerator keys

CHANGE TO:

Enable main menu accelerator keys

As the patch is controversial I won't push to git until at least Slavek has tested, preferably Tim too.
Comment 26 Michele Calgaro 2013-11-13 06:36:33 CST
> AS IS:
> Enable/disable main menu accelerator keys
> CHANGE TO:
> Enable main menu accelerator keys
Attached the new patch. I am not on a TDE machine, but being only an inline change I just manually edited the patch file

> As the patch is controversial I won't push to git until at least Slavek has
> tested, preferably Tim too.
Fair enough. Anyhow the default behavior is to leave everything as is (menu accelerator disabled), so it shouldn't cause any major problem. It just provides more options to the final user.
Comment 27 Michele Calgaro 2013-11-13 06:37:31 CST
Created attachment 1636 [details]
new patch
Comment 28 Darrell 2013-11-13 10:35:43 CST
The latest patch works as expected.
Comment 29 Slávek Banko 2013-11-13 15:28:37 CST
The patch looks good.
Just a few notes:

1) instead of QString should be TQString

2) instead of QString(m_session_string).remove('&')
   (and similar) I would suggest
   TQString(m_session_string).replace(TQRegExp("&([^&])"), "\\1")
Comment 30 Michele Calgaro 2013-11-13 23:50:38 CST
Created attachment 1639 [details]
updated patch

> 1) instead of QString should be TQString
Ah, yes! That was a silly mistake of mine

>2) instead of QString(m_session_string).remove('&')
>   (and similar) I would suggest
>   TQString(m_session_string).replace(TQRegExp("&([^&])"), "\\1")
Good suggestion, thanks!

I have attached the updated patch with Slavek's corrections.
Again, I am not on a TDE machine so I edited the file manually, but that should do.
Comment 31 Darrell 2013-11-14 11:34:34 CST
No surprises here with the latest patch. All is working here and no noticeable conflicts with mc.
Comment 32 Slávek Banko 2013-11-16 08:53:33 CST
Pushed to GIT in hash c244bac1.
Thank you both for your good work.