[texworks] Bug on OS X, was Re: Feature request: better keyboard shortcuts

Jérome Laurens jerome.laurens at u-bourgogne.fr
Fri Apr 16 08:09:16 CEST 2010


Le 14 avr. 2010 à 11:23, Bruno Voisin a écrit :

> Le 14 avr. 2010 à 09:39, Alain Delmotte a écrit :
> 
>>> TeXworks does not provide keyboard shortcuts for the menu bar, which are normally accessed with the ALT key (Alt-F = File menu, etc.).  Perhaps this is not considered necessary since many commands have their own shortcuts (Ctrl-S = save, etc.)--but not all of them do.  Unless we want to give every command its own shortcut (probably not realistic or easy to remember), let's add the usual shortcuts to the main menu bar and the items on each menu (with an underlined letter).  I think many TeX users are good keyboardists who would make use of the additional shortcuts.
>> That I proposed some time ago (October-December 2008); but it seems that Jonathan is not used to accelerators, shortcuts,...
> 
> It never occurred to me before that there could be shortcuts for such things. Probably a cultural thing, on the Mac I don't think shortcuts are that much used. And I've no idea what an accelerator is.
> 
> Looking deeper, it turns out such wide-ranging shortcuts on the Mac are dealt with at the OS level, in the Keyboard system pref pane, and that there's indeed a shortcut Ctrl-F2 to move the focus to the menu bar (then the arrow keys allows navigating from one menu to another and inside each menu):
> 
> <Capture d’écran 2010-04-14 à 11.00.23.png>
> 
> Accordingly, I suspect making TeXworks handle this on its own would create problems.
> 
> Bruno Voisin

On the mac, the programming interface offered virtual support for such keyboard shortcuts as an inheritance from the NEXT days (OS X is based on Next computers).
But IIRC this was not fully implemented in the user interface. 

On Mac OS X, to access a menu item without the mouse, you
1 - Move the focus to the main menu bar
2 - navigate through the menus using the arrow keys
3 - use  the space key to simulate a mouse down

Instead of navigating with the arrow key, you can type the name of the menu or menu item,
in most of the cases, the first letters suffice. It is somehow less comfortable than assigning a shortcut to each menu item like windows does
but it works as is with all the apps, including TeXworks of course.

The problem is that the keystroke is also captured by the text window :
1 - open TeXworks
2 - press keys: Ctrl-F2 "F" "I" <space> "S" <space>
This activates the Save command from the File menu.
You see the problem in the untitled document where keys "F" "I" <space>  where captured such that it starts now with "fi ".
This is an unexpected result solved by simply "undoing".

I consider this a low level bug and I would not be surprised if it were a problem in Qt itself.

This on TeXworks r511, OS X 10.6.2

Regards





More information about the texworks mailing list