eclipse.platform.swt icon indicating copy to clipboard operation
eclipse.platform.swt copied to clipboard

Eclipse shortcuts are broken with latest macOS >=14.6 update

Open soethoff opened this issue 1 year ago • 10 comments

With the latest macOS update (>=14.6) the handling of shortcuts which are also used by the operating system seems to be broken.

Example:

  • OS: Cmd+Shift+A -> 'Search man Page Index in Terminal'
  • Eclipse: Cmd+Shift+A -> 'Open Plug-in Artifact'

Before macOS 14.6, as long as the focus was set to Eclipse, the command 'Open Plug-in Artifact' got executed. After installing macOS 14.6 or higher, nothing happens.

The issue doesn't look like to be shortcut specific. If there is any OS shortcut defined using the same keyboard binding as an Eclipse shortcut, the OS shortcut wins.

Screenshots

eclipseShorcut_notWorking

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • [ ] All OS
    • [ ] Windows
    • [ ] Linux
    • [x] macOS (>=14.6)
  1. JRE/JDK version OpenJDK - 21.0.3 (SapMachine)

Version since Eclipse 2024-06 (4.32)

Workaround (or) Additional context Disabling the shortcut in the OS preferences will allow the Eclipse shortcut to work again.

soethoff avatar Aug 09 '24 15:08 soethoff

~Could you provide a more common example where this occurs? Is this just for shortcuts in Services? Could you add steps to reproduce?~

Edit - ignore this, see next comment.

Phillipus avatar Aug 09 '24 19:08 Phillipus

Actually I can reproduce this. In Eclipse on Sonoma selecting Cmd-Shift-A does nothing, whereas on Ventura it works. The workaround is to disable it in macOS System Settings.

Phillipus avatar Aug 09 '24 19:08 Phillipus

If you run a child debug Eclipse instance and press Cmd-Shift-A you get this written to Eclipse's Console (or look in Mac's Console app):

2024-08-09 21:02:55.475 Contents[11297:581569] Unable to find object to handle service <_NSServiceEntry - 0x600001319200:
	bundleIdentifier:		com.apple.Terminal
	bundlePath:			/System/Applications/Utilities/Terminal.app
	executablePath:			(null)
	defaultTitle:			Search man Page Index in Terminal
	localizedTitleWithoutSubstitutions:			Search man Page Index in Terminal
	defaultKeyboardShortcut:	<NSKeyboardShortcut: 0x600002ed1400 (⇧⌘A)>
	keyboardShortcut:		<NSKeyboardShortcut: 0x600002ed1400 (⇧⌘A)>
	message:			searchManPages
	portName:			Terminal
	sendPasteboardTypes:		[public.plain-text]
	returnTypes:			[(null)]
	userData:			(null)
	languages:			[(null)]
	required context: (
    "<_NSServiceFilter: 0x600000badb60 word limit: 20>"
)>

Phillipus avatar Aug 09 '24 20:08 Phillipus

The shortcut can work by doing this:

  1. Open Eclipse
  2. Try the key shortcut Cmd+Shift+A - nothing happens
  3. Open the menu Eclipse -> Services. Don't select any other sub-menu.
  4. Try the key shortcut Cmd+Shift+A - now it works

So maybe something is not registering from Eclipse/SWT with regard to activating the Services menu.

Phillipus avatar Aug 09 '24 21:08 Phillipus

Actually I can reproduce this. In Eclipse on Sonoma selecting Cmd-Shift-A does nothing, whereas on Ventura it works. The workaround is to disable it in macOS System Settings.

Just want to make clear, it's not a change introduced by the upgrade from Ventura to Sonoma. The issue was introduced with the minor update of Sonoma itself (14.5 -> 14.6). It also occurs on 14.6.1 and Dev Beta 5 of Sequoia (15.0 - 24A5309e).

soethoff avatar Aug 12 '24 07:08 soethoff

Just want to make clear, it's not a change introduced by the upgrade from Ventura to Sonoma. The issue was introduced with the minor update of Sonoma itself (14.5 -> 14.6). It also occurs on 14.6.1 and Dev Beta 5 of Sequoia (15.0 - 24A5309e).

Indeed. I only have a copy of Ventura to compare with Sonoma 14.6.1.

If this is an intentional change from Apple and given the behaviour noted in https://github.com/eclipse-platform/eclipse.platform.swt/issues/1398#issuecomment-2278801645 and that this isn't happening in native macOS apps, then it might require a change/workaround in menu activation somewhere in SWT, perhaps in the Display class. I spent some time playing with menu activation there but couldn't find any way to fix this problem (other than the workaround above.)

Phillipus avatar Aug 12 '24 09:08 Phillipus

NSMenu engineer at Apple here. This was an unintentional change (i.e., a bug) introduced in Sonoma 14.6. It is fixed in macOS Sequoia 15.1, beta 5, released this morning.

ecschlegel avatar Sep 23 '24 17:09 ecschlegel

NSMenu engineer at Apple here. This was an unintentional change (i.e., a bug) introduced in Sonoma 14.6. It is fixed in macOS Sequoia 15.1, beta 5, released this morning.

Thanks for that. :-) Will the fix be backported into Sonoma?

Phillipus avatar Sep 23 '24 17:09 Phillipus

So far, it has not been. I am looking for opportunities but not sure that it will be feasible.

ecschlegel avatar Sep 23 '24 17:09 ecschlegel

NSMenu engineer at Apple here. This was an unintentional change (i.e., a bug) introduced in Sonoma 14.6. It is fixed in macOS Sequoia 15.1, beta 5, released this morning.

That's great news! 👍 Did a quick re-test and updated my local test environment to the latest macOS Sequoia 15.1, Beta 5. The shortcut is now working as expected.

If everyone is okay with it, I suggest waiting to close this issue until a final macOS build with this change is released.

soethoff avatar Sep 24 '24 13:09 soethoff

Fix verified in stable version of macOS Sequoia 15.1, so I am closing this now. 👍

sratz avatar Nov 20 '24 13:11 sratz