Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command+B for Play the project shortcut sometimes takes two presses to activate #35429

Closed
Sakari369 opened this issue Jan 22, 2020 · 23 comments · Fixed by #85527
Closed

Command+B for Play the project shortcut sometimes takes two presses to activate #35429

Sakari369 opened this issue Jan 22, 2020 · 23 comments · Fixed by #85527

Comments

@Sakari369
Copy link

Godot version:
3.2.rc2.official

OS/device including version:
Macbook Pro 2014, macOS 10.14.16

Issue description:
Since updating to 3.2rc1, sometimes, but not always, usually when initially loading a project and trying to play it with Command+B keyboard shortcut, it takes two presses of the shortcut to actually start the project.

I did not see this happen with the latest 3.1 version. Reporting this for now,maybe will look into it more by compiling the engine and seeing what happens, but unfortunately don't have more info about this.

Steps to reproduce:
I don't know how to 100% reproduce this, as sometimes the Command+B works perfectly, but usually when initially I have loaded a project, and try to play it with Command+B, it needs two presses to start.

This might have something to do with the mouse focus, although I'm not sure, sometimes moving the mouse to a different location on the UI seems to help, this might be totally bogus though, I don't know.

Minimal reproduction project:

This seems to happen on any project I've already made.

@Sakari369
Copy link
Author

Godot command_b bug

Here you can see the behaviour. Observe the keyboard shortcuts being displayed on the bottom right of the animated gif.

@hiulit
Copy link

hiulit commented Jan 29, 2020

  • Godot Engine v3.2.stable.official
  • MacBook Pro (Retina, 15-inch, Mid 2015)
  • OpenGL ES 3.0 Renderer: Intel Iris Pro OpenGL Engine

It's happening to me too.

I can't seem to find a pattern. Sometimes it happens and sometimes it doesn't.

@Calinou
Copy link
Member

Calinou commented Jan 29, 2020

Can anyone reproduce this on Windows or Linux (with the F5 shortcut instead)?

@inDigiNeous @hiulit Can you reproduce this if you change the Editor > Play shortcut to something like F5 in the Editor Settings? If you can't bind F5, bind any other shortcut that doesn't require a modifier to be used.

@hiulit
Copy link

hiulit commented Jan 29, 2020

@Calinou I just changed it to Enter, and it works every time I press it.
I also tried F5 (which on a Mac laptop it's actually fn + F5) and it also works every time.

@Calinou
Copy link
Member

Calinou commented Jan 29, 2020

To macOS users: can you reproduce this on any earlier 3.2 build (from alpha0 to rc4)? You can download them here.

@akien-mga
Copy link
Member

akien-mga commented Jan 29, 2020

Might be worth checking if there's anything else bound to Cmd+B in the editor shortcuts that might take precedence.

CC @bruvzg

@hiulit
Copy link

hiulit commented Jan 30, 2020

@Calinou @akien-mga I found out that there are 3 shortcuts that use cmd + B.

Editor-Play

Script-Text-Editor-Go-To-Next-Bookmark

Tile-Map-Editor-Select

@akien-mga
Copy link
Member

Can you test disable the script text editor one and/or the tile map editor one to see if either of those is conflicting?

It could also explain the seemingly "random" behavior of the issue, maybe it's only not working the first time when you have the script editor or a tilemap in focus.

@Sakari369
Copy link
Author

Sakari369 commented Jan 30, 2020

@akien-mga Can confirm that changing the shortcut to F5 at least seems to fix this.

Disabling the other shortcuts with Command+B makes the play command execute in more cases, but after about 1 hour of use I still have to press Command+B twice sometimes when returning focus to the Godot window. Will test more with the F5 for example to see if this works always.

@Sakari369
Copy link
Author

Sakari369 commented Jan 30, 2020

To macOS users: can you reproduce this on any earlier 3.2 build (from alpha0 to rc4)? You can download them here.

I have seen this on all 3.2 RC1, RC2 and RC4 a least (skipped RC3 i think), and now on 3.2 master also. Didn't see this on 3.1.1 or 3.1.2.

@hiulit
Copy link

hiulit commented Jan 30, 2020

Can you test disable the script text editor one and/or the tile map editor one to see if either of those is conflicting?

@akien-mga I've tried disabling the script editor shortcut and it seems to work better, but not a 100%.

Also, I'm adding Play Scene Cmd + R into the mix.

Play-Scene

Refresh-Graph

It behaves as bad as Play Cmd + B.

And I didn't see this behaviour in 3.1.x either.

@KoBeWi
Copy link
Member

KoBeWi commented Dec 14, 2020

Can anyone still reproduce this bug in Godot 3.2.3 or any later release?

@Sakari369
Copy link
Author

Can anyone still reproduce this bug in Godot 3.2.3 or any later release?

Hey! Still can see in 3.2.4 beta4 ! Feels like sometimes I have to click the main view to make it work. Not sure though, after I moved to using F5 i have not seen it happen, so it has something to do probably with Cmd+B being bound to multiple things or having to handle a key combination differently than a single key ? Just guessing.

@EricEzaM
Copy link
Contributor

Might be fixed in master, needs testing.

@coppolaemilio
Copy link
Member

I was having issues running the game by pressing command + B on my Mac (M1, Ventura 13.2.1).
To fix it I had to remove a shortcut that was already using the same command as noted on a comment above.

Godot version: 4.0.1.stable

@fdstevex
Copy link
Contributor

Still happening in 4.1.3. Cmd-B is also bound to Bookmark by default, and when the cursor is sitting in an editor, that seems to take precedence. Removed that binding and Cmd-B to Run Project works reliably.

@coppolaemilio
Copy link
Member

I guess the solution would be to change the shortcut for bookmark to Cmd-shift-B in mac?

@fdstevex
Copy link
Contributor

I went looking for where this is defined and it seems like the current default is Option-B.

So maybe this issue is only hitting people who have a keymap that was created before this change?

https://github.com/godotengine/godot/blob/4c5a1484527ec5f8e320a24d0ee4c4fde0514776/editor/gui/editor_run_bar.cpp#L381C2-L381C2

@bruvzg
Copy link
Member

bruvzg commented Nov 29, 2023

I went looking for where this is defined and it seems like the current default is Option-B.

KeyModifierMask::META is Command not Option, Option+B can't be used since it's used to input some special characters (like ).

@fdstevex
Copy link
Contributor

fdstevex commented Nov 29, 2023

Ok - so yeah the fix is as you said, change the shortcut for Go to Next Bookmark to Cmd-Shift-B.

Actually - Cmd-Shift-B is already Toggle Bookmark. Cmd-Shift-Option-B?

@bruvzg
Copy link
Member

bruvzg commented Nov 29, 2023

yeah the fix is as you said, change the shortcut for Go to Next Bookmark to Cmd-Shift-B.

It's already used as well as most others options (and already have other conflicts as well):

ED_SHORTCUT("script_text_editor/toggle_bookmark", TTR("Toggle Bookmark"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::ALT | Key::B);
ED_SHORTCUT("script_text_editor/goto_next_bookmark", TTR("Go to Next Bookmark"), KeyModifierMask::CMD_OR_CTRL | Key::B);
ED_SHORTCUT("script_text_editor/goto_previous_bookmark", TTR("Go to Previous Bookmark"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::B);

ED_SHORTCUT_OVERRIDE("script_text_editor/toggle_breakpoint", "macos", KeyModifierMask::META | KeyModifierMask::SHIFT | Key::B);

p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_make_bones", TTR("Make Bone2D Node(s) from Node(s)"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::B), SKELETON_MAKE_BONES);

It's quire hard to find free combinations (at least without using 3+ modifiers) and avoid conflicts with input and system shortcuts. So it's definitely not the only one with this issue.

@fdstevex
Copy link
Contributor

Yeah no kidding. "Run Project" is probably one of the most important shortcuts and the current behaviour where it works sometimes is maddening.

@coppolaemilio
Copy link
Member

I would be in favor of removing the bookmark shortcut for mac users just to get the running one by default

@YuriSizov YuriSizov added this to the 4.3 milestone Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants