Checking other shortcuts I see that definitions are case sensitive. We have for instance
("std z" (undo 0)) ("std Z" (redo 0)) So, to define Ctrl+Shift+a I need (kbd-map ("C-A" …)). No modification to keyPressEvent() is needed and the proper kbd-map is ("C-A" …) not ("C-a" …) right? If this is the case I don't understand commit 6060. Best, -- Miguel de Benito. On Jan 1, 2013, at 2:53 PM, Miguel de Benito Delgado <m.debenit...@gmail.com> wrote: > 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? > > Best, > -- > Miguel _______________________________________________ Texmacs-dev mailing list Texmacs-dev@gnu.org https://lists.gnu.org/mailman/listinfo/texmacs-dev