bugGNU TeXmacs - Bugs: bug #40372, in menus, Ampersand not shown in...


You are not allowed to post comments on this tracker with your current authentification level.

bug #40372: in menus, Ampersand not shown in keyboard shortcuts

Submitted by:  Lebreton Romain <lebreton>
Submitted on:  Fri Oct 25 16:01:13 2013  
Category: Qt portPriority: 7 - High
Item Group: ErrorStatus: Confirmed
Privacy: PublicAssigned to: Miguel de Benito <mdbenito>
Originator Name: Open/Closed: Open
Release: Release: None
Fixed Release: NoneFixed Release: 

(Jump to the original submission Jump to the original submission)

Thu Mar 23 21:16:03 2017, comment #7:

updating the description to current status

Missing shortcuts in menus
in menus, Ampersand no shown in keyboard shortcuts

Philippe Joyez <pjoyez>
Project Member
Sat Jan 18 22:55:01 2014, comment #6:

Most problems seem related to interactions between Qt and Unity/Ubuntu. Under Win/Mac the only problem are the ampersands

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Sat Jan 18 22:53:33 2014, comment #5:

Revision 8142 skips Qt's shortcuts and routes all keypresses through the editor. This ensures consistent shortcuts (and might avoid "Ambiguous shortcut" warnings).

However, the issue with the ampersand in the menus is unresolved: Qt refuses to display one if using QKeySequence, even when escaped as the docs suggest.

Unresolved as well is the issue with the menu Insert->Mathematics.

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Sat Jan 18 22:45:21 2014, comment #4:

Revision 8141 changes the shortcuts for zoom in and out in Emacs mode (as mentioned, Alt+something is a bad idea under MacOS) and fixes the problem with the $ shortcut for math.

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Sat Jan 18 18:01:49 2014, comment #3:

The reason some shortcuts do work but Alt-+ under MacOS doesn't is that this key combination means ± in this OS, which TeXmacs correctly interprets as the <pm> ("plus minus") sign. IF the View menu has been displayed, a QKeySequence has been installed for Alt-+ and the QTMWidget never sees the keypress.

Under MacOS, using Alt+ for shortcuts may lead to many such problems, since many characters are typed with alt. This is my whole keyboard with Alt pressed (notice that some are actually indispensable):

Because menus are implemented with promise widgets, they are not actually instantiated until shown. This means that the Qt Shortcuts aren't created and attached to a widget until they must be displayed. I don't know how to overcome this without forcing the instantiation of the promise widget. The solution is therefore:

1. Don't use Alt-anything under MacOS.
2. Stop using QKeySequences and let the event handler in the QTMWidget handle all keypresses. This makes more sense since most menu items should only be active while the focus is in a texmacs widget.
3. Don't use QKeyEvent::text() in QTMWidget::keyPressEvent(), since this translates the key combination into Unicode (with caps, and stuff like Alt-+ -> ±, etc)

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Fri Nov 29 18:07:37 2013, comment #2:

This is a quite annoying bug indeed. Long shortcuts are also not displayed correctly. Moreover, certain shortcuts (such as Alt-+ and Alt-- for Emacs profile under MacOS) only work if they have been displayed in a menu first (the View menu in this case)!

Joris van der Hoeven <vdhoeven>
Project Administrator
Sat Oct 26 19:01:58 2013, comment #1:

The same problem occurs under MacOS.

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Fri Oct 25 16:01:13 2013, original submission:

Sometime the shortcuts are not indicated in the menus or in the toolbar.

Example: In the 'mode' toolbar, if you click on the math "epsilon square" symbol, it shows
Equation Alt+$
Equations Alt+

The first problem is that the shortcut "$" for Formula is not printed.
A different problem is that the shortcut "Alt+&" for Equations is not correctly printed because the symbol '&' seems to be missing in the font.

Another Example: In the menu Insert -> Mathematics, no shortcuts are shown.

I am using Qt TeXmacs on Ubuntu with Gnome Look and Feel.

Lebreton Romain <lebreton>
Project Member


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by pjoyez (Posted a comment)
  • -unavailable- added by vdhoeven (Posted a comment)
  • -unavailable- added by mdbenito (Posted a comment)
  • -unavailable- added by lebreton (Submitted the item)

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

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Mar 24 07:33:01 2017pjoyezSummaryMissing shortcuts in menus=>in menus, Ampersand not shown in keyboard shortcuts
    Fri Nov 29 18:07:37 2013vdhoevenCategoryUser Interface=>Qt port
      Priority5 - Normal=>7 - High
    Sat Oct 26 19:01:58 2013mdbenitoItem GroupNone=>Error
      Assigned toNone=>mdbenito

    Back to the top

    Powered by Savane 3.1-cleanup1