Skip to content

Fix MacOS Delete key handling in editor views.#4117

Open
ifromstone wants to merge 2 commits into
FlaxEngine:masterfrom
ifromstone:dev/MacOSDeleteKeyHandling
Open

Fix MacOS Delete key handling in editor views.#4117
ifromstone wants to merge 2 commits into
FlaxEngine:masterfrom
ifromstone:dev/MacOSDeleteKeyHandling

Conversation

@ifromstone

Copy link
Copy Markdown
Contributor

Summary

Fix macOS Delete key handling in editor views where the physical Delete key is reported as Backspace.

On macOS, pressing Delete while an item is selected in the Content window could trigger folder history navigation instead of deleting the selected content item. This change adds a small shared input helper and uses it in the affected editor views so the key performs deletion when there is an active selection.

Changes

  • Added InputUtils.IsKeyPerformDeletion() to centralize platform-specific delete-key behavior.
  • Updated the Content view to delete selected content items before falling back to Backspace navigation.
  • Updated the Content tree to delete selected content items when the platform delete key is pressed.
  • Updated scene editor key handling paths to use the same helper for selected scene objects.

Notes

The macOS-specific behavior is kept inside InputUtils. On non-MacOS platforms, the helper does not change existing Delete shortcut handling.

Treat the macOS Backspace key as a delete action in content and scene
editor views when an item is selected, while preserving Backspace
navigation when no content item is selected.
@mafiesto4 mafiesto4 added platform editor input User input (keyboard, mouse, gamepads, touch) fix labels May 27, 2026
@mafiesto4 mafiesto4 added this to the 1.13 milestone May 27, 2026
@mafiesto4

Copy link
Copy Markdown
Member

Would it make sense to remap Delete key to Backspace under the hood so all code handles it that way? (keybinds, game scripts, vidual input, etc.))

@ifromstone

Copy link
Copy Markdown
Contributor Author

Would it make sense to remap Delete key to Backspace under the hood so all code handles it that way? (keybinds, game scripts, vidual input, etc.))

@mafiesto4 This does make sense.
I've prepared a separate PR - #4123; if everything goes well with it, then this one can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editor fix input User input (keyboard, mouse, gamepads, touch) platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants