1. TortoiseHg
  2. TortoiseHg
  3. thg
Issue #1976 resolved

Right Alt-N opens new Workbench window

Anonymous created an issue

In Polish keyboard layout AltGr(right)-N is for "ń" character. I connot use it in revision description and other text boxes. New Workbench windows appears instead.

Comments (13)

  1. Angel Ezquerra

    That is weird. The shortcut for "New Workbench" is already Ctrl+Alt+N ! The relevant code is:

    newaction(_("New &Workbench..."), self.newWorkbench, shortcut='Ctrl+Alt+N', menu='file', icon='hg-log')

    This is line 223 in workbench.py.

    Perhaps on the polish keyword right Alt (i.e. AltGr) is equivalent to Ctrl+Alt?

    Angel

  2. Piotr Klecha

    That is correct, i.e. Ctrl+(left)Alt == (right)Alt on Polish keyboard layout. There are two more shortcut conflicts (also manifesting usually on the commit tab) - 'Open subrepository' (Ctrl+Alt+O - Polish letter 'ó') and 'Explore subrepository' (Ctrl+Alt+E - Polish letter 'ę'). Since those shortcuts apply only to subrepo actions, the workaround in this case is simplier - you have to select a different entry on the commit tab and the problem goes away. Nonetheless, it is extremely annoying.

  3. Angel Ezquerra

    I guess that we should avoid all Ctrl+Alt shortcuts then. When possible we should change them into Ctrl+Shift.

    Is there an easy way to see if there are shortcut conflicts on a QT application? That is, is there a way to tell if changing 'Open subrepository' to 'Ctrl+Shift+O' and 'Explore subrepository' to 'Ctrl+Shift+E' will create a conflict with some other shortcut?

  4. Yuya Nishihara

    I tried changing the New Workbench shortcut from Ctrl+Alt+N to Ctrl+Shift+N

    It conflicts with "New Repository". You can see the warning message in console:

    QAction::eventFilter: Ambiguous shortcut overload: Ctrl+Shift+N
    

    (probably --nofork is needed on Windows)

  5. Angel Ezquerra

    Yuya, you are right as usual.

    I've been looking into this and I think that there are a few shortcuts that do not work well. It seems that many (all?) the shortcuts on the revision details file list context menu do not work until you actually right click on the file and show the context menu. Even worse, once you've done so, it seems that the shortcut ignores the currently selected file. Instead it runs on the file that you right clicked on before.

    Personally I think that these context menu shortcuts are not very useful anyway. Perhaps it would be best to simply remove them.

  6. Yuya Nishihara

    many (all?) the shortcuts on the revision details file list context menu do not work until you actually right click

    That is a bug on default branch, probably caused by b6d91077d807. I should fix it until next stable release, thanks.

    these context menu shortcuts are not very useful anyway

    I thinks revdetails have too much shortcut keys as compared to revision context menu, but not sure it can be fully removed. At least, they should have Alt+ access key instead.

  7. Angel Ezquerra

    Yuya,

    I've sent a fix for this issue to the TortoiseHg mailing list. The fix is not perfect because it still fails if the user uses the keyboard to select a file in the revision details our manifest file list, but it will work fine if the user clicks on the file.

  8. Steve Borho

    shortcuts: change all "Ctrl+Alt" shortcuts into "Ctrl+Shift" shortcuts (closes #1976)

    Ctrl+Alt becomes "AltGr" on some international keyboards, which is a key that is used to type some "accented" or special characters.

    Because of this we should never use any Ctrl+Alt shortcut.

    In doing these change I've had to drop or change some existing shortcuts because they colided with other shortcuts. In particular:

    - The "New Workbench" shortcut has been changed to "Ctrl+Shift+W" because "Ctrl+Shift+N" shortcut is already taken by "Clone". - Repository/Explore has been changed to Shift+Ctrl+X, so that "Save at revision" can be Shift+Ctrl+S. - The keyboard shortcuts for "Explore subrepository" and "Expore folder" have been removed because they collided with Repository/Explore. - Revert has been changed to "Shift+Ctrl+R". - Edit local has been changed to "Shift+Ctrl+L", while "View at revision" is now Shift+Ctrl+E. - "Open subrepo" is now "Shift+Ctrl+O".

    723a6ed2fde4

  9. Log in to comment