bugGNU Octave - Bugs: bug #56156, shortcuts not displayed in editor...


bug #56156: shortcuts not displayed in editor right-click menu

Submitted by:  eflister <eflister>
Submitted on:  Wed 17 Apr 2019 05:15:33 PM UTC  
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Invalid Assigned to:  None
Originator Name:  eflister Open/Closed:  Closed
Release:  5.1.0 Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 18 May 2019 08:02:39 AM UTC, comment #5: 

Whether shortcuts are shown in context menus or not is a global setting of the OS or the window manager. This setting can be checked since Qt 5.10 with

QGuiApplication::styleHints ()->showShortcutsInContextMenus ()

On my Debian/Gnome system this flag is false, which explains that I do not see shortcuts in the context menu. QStyleHints are read only [1], thus, there is no possibility to changed this setting from octave and, even if it was, we should not break the general setting of the window manager.

From the "Human Interface Guidelines" on MacOS [2], shortcuts in context menus are regarded redundant and are unwanted [3]:

"Show keyboard shortcuts in menu bar menus, not contextual menus. Contextual menus are already shortcuts to task-specific commands; it's redundant to display keyboard shortcuts too."

I am closing this report as "invalid", since octave does not suppress or disable shortcuts in context menus. The behavior follows a global preference that has to be set in the OS or window manager.

[1] https://doc.qt.io/qt-5/qstylehints.html
[2] https://developer.apple.com/design/human-interface-guidelines
[3] https://developer.apple.com/design/human-interface-guidelines/macos/menus/contextual-menus

Torsten Lilge <ttl>
Project Member
Wed 17 Apr 2019 07:47:53 PM UTC, comment #4: 

Oops, screenshot is now attached.

The fact that it works for some, and not for others, probably indicates there is a configuration option somewhere, possibly deep in Qt.

For the record, I'm using KDE as the window manager which is sometimes different from the more common GNOME.

Rik <rik5>
Project Administrator
Wed 17 Apr 2019 07:24:07 PM UTC, comment #3: 

The shortcuts are not shown in the editor's context menu of my system (Debian), only in the normal menus. I have currently no idea why there is a different behvior.

Torsten Lilge <ttl>
Project Member
Wed 17 Apr 2019 06:10:31 PM UTC, comment #2: 

well i don't see any attached files but i don't think this should be marked "works for me" if you don't try it in the OS indicated in the report.

eflister <eflister>
Wed 17 Apr 2019 05:44:17 PM UTC, comment #1: 

Works for me (on Linux).  See the attached screenshot which is the right-click menu of the Editor from version 5.1.0.

Rik <rik5>
Project Administrator
Wed 17 Apr 2019 05:15:33 PM UTC, original submission:  

this is important for discovery.

i also constantly need `format/indent code` but it doesn't have a default shortcut assigned.  in matlab iirc it is cmd-\, consider adding it to defaults?

eflister <eflister>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by eflister (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-18 ttl StatusConfirmed => Invalid
        Open/ClosedOpen => Closed
    2019-04-17 rik5 StatusWorks For Me => Confirmed
        Operating SystemMac OS => Any
    2019-04-17 rik5 Attached File- => Added Editor_Right_Click_Menu_Linux.png, #46788
    2019-04-17 rik5 StatusNone => Works For Me

    Back to the top

    Powered by Savane 3.5