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


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

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

Submitter:  Lebreton Romain <lebreton>
Submitted:  Fri 25 Oct 2013 04:01:13 PM UTC
Category:  Qt port Priority:  7 - High
Item Group:  Error Status:  Confirmed
Privacy:  Public Assigned to:  mdbenito
Originator Name:  Open/Closed:  Open
Release:  None Release: 
Fixed Release:  None Fixed Release: 

Jump to the original submission

Thu 23 Mar 2017 09:16:03 PM UTC, comment #7: 

updating the description to current status

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

Philippe Joyez <pjoyez>
Group Member
Sat 18 Jan 2014 10:55:01 PM UTC, 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>
Group Member
Sat 18 Jan 2014 10:53:33 PM UTC, 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>
Group Member
Sat 18 Jan 2014 10:45:21 PM UTC, 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>
Group Member
Sat 18 Jan 2014 06:01:49 PM UTC, 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>
Group Member
Fri 29 Nov 2013 06:07:37 PM UTC, 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>
Group administrator
Sat 26 Oct 2013 07:01:58 PM UTC, comment #1: 

The same problem occurs under MacOS.

Miguel de Benito <mdbenito>
Group Member
Fri 25 Oct 2013 04:01:13 PM UTC, 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>
Group Member


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

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-03-24 pjoyez SummaryMissing shortcuts in menus in menus, Ampersand not shown in keyboard shortcuts
    2013-11-29 vdhoeven CategoryUser Interface Qt port
        Priority5 - Normal 7 - High
        StatusNone Confirmed
    2013-10-26 mdbenito Item GroupNone Error
        Assigned toNone mdbenito

    Back to the top

    Powered by Savane 3.12