AFAICT, the problem here is that there is a duplicate command accelerator assignment: IDLE assigns CMD-M to its Open Module command (https://github.com/python/cpython/blob/master/Lib/idlelib/config-keys.def#L205) but either Tk or the underlying macOS services it uses already use CMD-M to mean "minimize the front window to the Dock" (https://support.apple.com/en-us/HT201236). You can see in the IDLE menu bar where CMD-M shows up in the Window menu stack (with Minimize) but not in the the File stack (where Open Module is). Since CMD-M has a commonly used system-wide meaning, it would probably be best to change IDLE's Open Module to use something else. |