godot icon indicating copy to clipboard operation
godot copied to clipboard

Shift+Command+Up is hidden, unremovable shortcut conflicting with user shortcut

Open michaelgundlach opened this issue 3 years ago • 1 comments

Godot version

4.0 beta 4

System information

Mac OS 12.3.1

Issue description

In the Script Editor Shift+Command+Up behaves as expected in Mac OS: it selects text to the beginning of the document.

But if that key combo is added by the user as a keyboard shortcut for e.g. Expand Bottom Panel, it won't work when the Script Editor is focused, as the Script Editor consumes the shortcut (#68122).

The normal workaround until #68122 is fixed is to remove the offending Script Editor shortcut, but this one does not appear in the shortcut editor.

The fix: either fix #68122 or expose Shift+Command+Up and other text-movement-related keys as shortcuts to remove.

Steps to reproduce

  1. Remap Expand Bottom Panel to Shift+Command+Up instead of Shift+F12.
  2. Focus the Script Editor.
  3. Press Shift+Command+Up. The Bottom panel is not expanded.
  4. Open Keyboard Shortcuts and search for Shift+Command+Up to remove it as a workaround for #68122.

Expected behavior: Shift+Command+Up is listed for "Select to beginning of document" so that you can delete or remap it.

Actual behavior: No results found.

Minimal reproduction project

No response

michaelgundlach avatar Nov 01 '22 16:11 michaelgundlach

Check the "common" section of the shortcut editor. It is not the script editor that has that shortcut, but the underlying text edit control, and Command+Up is valid in all text edits.

EricEzaM avatar Nov 28 '22 12:11 EricEzaM

@EricEzaM Thanks for the explanation. In exploring this, though, I found further inexplicable Command+Up behavior:

Repro:

  1. Remove all shortcuts assigned to Shift+Command+Up or to Command+Up
  2. Assign Expand Bottom Panel to Shift+Command+Up (similar repro using Command+Up)
  3. Click in blank area of a 2D editor containing a CharacterBody2D with a CollisionShape2D child.
  4. Press the shortcut from step 2
  5. Click the CollisionShape2D in the editor.
  6. Press the shortcut from step 2 again

Expected behavior: Expand Bottom Panel is triggered in step 4 and in step 6.

Actual behavior: Nothing happens in step 4. In step 6, Command+Up will center the node, while Shift+Command+Up will move it slightly.

So it looks like there are "secret" Shift+Command+Up and Command+Up shortcuts for changing position? Or am I missing somewhere that these shortcuts are assigned? Let me know if I should file a new bug for this.

michaelgundlach avatar Dec 01 '22 21:12 michaelgundlach

Sounds like the 2D editor is swallowing those inputs. I can try take a look later.

EricEzaM avatar Dec 01 '22 22:12 EricEzaM