eclipse-platform / eclipse.platform.swt

Eclipse SWT
https://www.eclipse.org/swt/
Eclipse Public License 2.0
112 stars 135 forks source link

[macOS Sequoia] Context menu key shortcut causes undesired behaviour #1483

Open Phillipus opened 1 week ago

Phillipus commented 1 week ago

macOS Sequoia introduced native OS-level support for accessing the context (right-click) menu using a key shortcut. The default is Ctrl+Enter (this can be customised or disabled in macOS Keyboard settings).

Unfortunately in (any version of) Eclipse this can cause undesired behaviour. For example:

  1. Select something in Package Explorer
  2. Press Ctrl+Enter to access the context menu
  3. The context menu will appear
  4. Press Escape to cancel the context menu
  5. The context menu for the part tab will now appear (the one with "Close", "Close Others" etc)
  6. The selection in the Package Explorer tree will now be something else (random selection) and/or the selected file will open in the editor

That's just one example. Pressing Ctrl-Enter in other Views or Editors will lead to similar and unwanted behaviour.

It may be that somewhere in SWT on Mac the key combination for the context menu needs to be trapped. The default Eclipse key binding of Shift+F10 invokes the context menu and this works OK in Eclipse.

I'm just reporting the issue, I have no idea how to fix this.

Environment:

macOS Sequoia 15.0

Phillipus commented 1 week ago

@tmssngr As a matter of interest this is also causing erratic behaviour in SmartGit. I don't know if you want to take a look at this as well?

Phillipus commented 6 days ago

@jukzi Wrong label. Should be macOS.

dshowing commented 4 days ago

This change is really annoying, but uncheck it here to restore the previous functionality

image image