Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE: Menu accelerator conflict between Format and Options #57528

Open
serwy mannequin opened this issue Nov 2, 2011 · 9 comments
Open

IDLE: Menu accelerator conflict between Format and Options #57528

serwy mannequin opened this issue Nov 2, 2011 · 9 comments
Labels
3.8 only security fixes topic-IDLE type-feature A feature request or enhancement

Comments

@serwy
Copy link
Mannequin

serwy mannequin commented Nov 2, 2011

BPO 13319
Nosy @terryjreedy, @ned-deily, @serwy, @csabella
Files
  • issue13319.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2011-11-02.01:03:56.982>
    labels = ['expert-IDLE', 'type-feature', '3.8']
    title = 'IDLE: Menu accelerator conflict between Format and Options'
    updated_at = <Date 2018-02-12.14:31:10.988>
    user = 'https://github.com/serwy'

    bugs.python.org fields:

    activity = <Date 2018-02-12.14:31:10.988>
    actor = 'cheryl.sabella'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2011-11-02.01:03:56.982>
    creator = 'roger.serwy'
    dependencies = []
    files = ['23879']
    hgrepos = []
    issue_num = 13319
    keywords = ['patch']
    message_count = 9.0
    messages = ['146819', '147054', '147062', '147064', '147065', '149017', '229967', '230025', '312055']
    nosy_count = 4.0
    nosy_names = ['terry.reedy', 'ned.deily', 'roger.serwy', 'cheryl.sabella']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue13319'
    versions = ['Python 3.8']

    @serwy
    Copy link
    Mannequin Author

    serwy mannequin commented Nov 2, 2011

    This is a minor interface issue. The accelerator for opening the _Options menu in an editor conflicts with the F_ormat menu.

    I suggest changing the Options accelerator to "i" since Alt-t is for toggling tabs. (Perhaps the accelerator for <<toggle-tabs>> should be dropped, so that the options menu could be accessed by Alt-t.)

    @serwy serwy mannequin added topic-IDLE type-feature A feature request or enhancement labels Nov 2, 2011
    @terryjreedy
    Copy link
    Member

    The conflict is not fatal for keyboard users because repeating alt-o switches between Format and Options. To resolve the conflict, I would prefer to keep alt-o for Options, both because it is the first letter of Options and because Options appears on Shell windows. The only non-conflicting character in Format is 'a'.

    @serwy
    Copy link
    Mannequin Author

    serwy mannequin commented Nov 5, 2011

    Which platform are you running?

    On Linux (Ubuntu 11.10, Python 3.2, Tk 8.5), Alt-o does not toggle between Format and Options. The first Alt-o selects "Format" and the second Alt-o selects "Comment Out Region".

    Changing Format's accelerator to "a" would be inconsistent with other applications that use "o", such as LibreOffice and Abiword. Consistency aside, changing Format to "a" would be the simplest fix.

    @terryjreedy
    Copy link
    Member

    Py 3.2 on Win 7. 'Comment out region' is Alt-3 here.

    @serwy
    Copy link
    Mannequin Author

    serwy mannequin commented Nov 5, 2011

    Alt-3 is comment-out region on Linux as well. The problem is that "o" is an accelerator for "Comment Out Region" under the Format menu. Pressing "Alt-o and o" under Linux is equivalent to "Alt-o and Alt-o".

    This toggling between Format and Options may be a Tk bug under Linux since it works on Win7.

    @serwy
    Copy link
    Mannequin Author

    serwy mannequin commented Dec 8, 2011

    Attached is a patch to have Alt-i bring up the Options menu.

    @terryjreedy
    Copy link
    Member

    Currently, in 3.4 Win 7, tk 8.6, Alt O <enter> (or Alt O O O <enter>, etc) is required to get the Format menu to drop down. Following that with Alt O does select comment out. Alt O O <enter> (with or without holding down Alt) opens the Option menu. Having to hit <enter> makes both possible, but it was not obvious to me. I only tried hitting <enter> 'in desperation'. So I would like to remove the conflict.

    As I said before, I really want Alt-O to open the always present Options menu. Alt-I is completely unmnemonic to me. The 'i' in 'option' is silent in that it mutates 't' to 'sh' but is not pronounced in itself as a vowel. I don't consider a couple of other editors to be determinative for Idle. Notepad++ has 11 menu items and not all even have an Alt hotkey. To open without a mouse, one must hit Alt and then move with <- and -> arrow keys.

    I would like to change the hot key for <<toggle-tabs>> to Alt-7. We could then use Alt-T (Meta-T) for Forma_t. Alt 5 & 6 are already used for Tabify and Untabify, so using the next key for tab toggle makes sense to me. (And if we ever need Alt-U for something else, I would change the hot key for the probably seldom used 'Indent width' to Alt-8).

    Ned, do you have any opinion on this issue?

    @ned-deily
    Copy link
    Member

    I believe it is the case that none of these proposed changes would have any effect on Aqua (native, non-X11) OS X Tk variants (Cocoa or Carbon). Unlike on Windows and X11, standard OS X menus in conforming GUI apps do not have underline letter shortcuts. (OS X provides an application-independent way to navigate menu hierarchies in all apps using the keyboard; the link below has more details.) OS X apps, of course, do have modifier key accelerators but, in almost all cases, the actual key combinations are different from those on other platforms, as defined in the default sets in config-keys.def.

    Mark Roseman's TkDocs web site tutorial (and book) has a good overview of Tk menus and the most significant platform differences.

    http://www.tkdocs.com/tutorial/menus.html

    https://developer.apple.com/library/mac/documentation/Accessibility/Conceptual/AccessibilityMacOSX/OSXAXKeyboardShortcuts/OSXAXKeyboardShortcuts.html

    @csabella
    Copy link
    Contributor

    Maybe a solution for this would be to change the name of the 'Format' menu to something like 'Source'? Interestingly, the Format menu is available on outwin, even though that is output-only, so I guess 'Source' would only make sense if the other uses of an EditorWindow remove it from the menu.

    @csabella csabella added the 3.8 only security fixes label Feb 12, 2018
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes topic-IDLE type-feature A feature request or enhancement
    Projects
    Status: No status
    Development

    No branches or pull requests

    3 participants