[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Shift modifier, lowercase and uppercase in shortcuts

From: Miguel de Benito Delgado
Subject: [Texmacs-dev] Shift modifier, lowercase and uppercase in shortcuts
Date: Tue, 1 Jan 2013 14:53:58 +0100

Hi all,

  currently, pressing Ctrl+Shift+a results in the key press "C-A" being sent to 
TeXmacs instead of "C-S-a". The rewrite is performed inside 
QTMWidget::keyPressEvent() with

        if (((char) key) >= 'A' && ((char) key) <= 'Z') {
          if ((mods & Qt::ShiftModifier) == 0)
            key= (int) (key + ((int) 'a') - ((int) 'A'));
        mods &=~ Qt::ShiftModifier;

This was part of a patch by Massimiliano and Norbert Nemec (svn 2786).

I don't understand why this code is so. What bothers me is that the sift 
modifier is removed unconditionally but the lowercasing is conditional. Are 
Texmacs shortcuts case sensitive? Should they? I want to define a shortcut 
"C-S-a", and currently I only can do this with "C-A". I think that the  
ShiftModifier shouldn't be removed. Changing those 5 lines to:

        if (((char) key) >= 'A' && ((char) key) <= 'Z')
            key= (int) (key + ((int) 'a') - ((int) 'A'));

leaves the modifier and enables us to define shortcuts like "C-S-a". Is there a 
problem with this?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]