Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Global hotkey got broken after mac sleep

Open mulecalle opened this issue 2 years ago • 11 comments

Discord username (optional)

No response

Describe the bug

I have two displays:

Screenshot 2023-06-28 at 21 36 31

Warp recognizes the external display C27JG5x as Screen 2 and Built-in Retina as Main screen.

The following Global hotkey configuration used to work well, however since some releases ago after I wake up the Mac from sleep the terminal is always open/closed in the Main screen

Screenshot 2023-06-28 at 21 34 22

To reproduce

  1. Go to Settings, then Features and apply the following configuration: Screenshot 2023-06-28 at 21 34 22

  2. Press ⌥W, then verify that Warp is open in the Screen 2

  3. Put the Mac to sleep

  4. Wake up the Mac

  5. Press ⌥W

Actual Behaviour Warp is open in the Main Screen

Expected behavior

Warp is open in the Screen 2

Screenshots

No response

Operating system

MacOS

Operating system and version

13.4 (22F66)

Shell Version

GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin22)

Current Warp version

v0.2023.06.20.08.04.stable_03

Regression

Yes, this bug started recently or with an X Warp version

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

No

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

None

mulecalle avatar Jun 29 '23 00:06 mulecalle

Hi @mulecalle I've found this difficult to reproduce. What I recommend to fix this is to make sure the display is set to "Main Display" in the Arrange settings so that the other display will be Display 2.

https://github.com/warpdotdev/Warp/assets/16809145/8329c8fd-d5ab-489d-9541-467d281f5672

If the issue persists, please try and close the Dedicated window by pressing CMD-W with it open and focused. Then it will generate a new window in the proper display as your new customization will apply the next time a Dedicated Window is created, not the currently opened one.

dannyneira avatar Jun 29 '23 15:06 dannyneira

Hi, @dannyneira thank you for your response, this video was captured in the main display after a wake-up from sleep. Warp is opened/closed by pressing the keybinding configuration (⌥W)

https://github.com/warpdotdev/Warp/assets/48928350/6fc38067-a87a-483d-a870-195d0a435f9b

As you can see the issue persists. I also tried your recommendations and it works however it's kind of annoying closing and re-opening.

mulecalle avatar Jun 30 '23 14:06 mulecalle

Thanks for confirming. We'll post any further updates on this thread if/when this is being worked on/completed.

dannyneira avatar Jul 28 '23 17:07 dannyneira

I have this annoying issue as well for a long time, and it is driving me nuts. My setting is to open on the main screen, but after sleep it often switches to another one. I need to go to settings, set open to active screen, toggle twice, and change the setting back. I really hope this issue gets some attention and care !

derlin avatar Oct 06 '23 11:10 derlin

Is there any update on this? I love Warp but this bug messes with my flow on a regular basis, it would be really great if this could be fixed, thanks!

paul-voelker avatar Feb 14 '24 15:02 paul-voelker

I often encounter issues with all three screen options: Active Screen, Main Screen, and Screen 2.

Here's what usually happens when I invoke Warp using the global hotkey:

  • Active Screen: Warp would appear and remain on a screen that is not the Active Screen.
  • Main Screen: Warp would appear and remain on Screen 2.
  • Screen 2: Warp would appear and remain on Main Screen.

Switching screen setting doesn't resolve the issue, but restarting Warp temporarily fixes this issue.

I would say that the problem usually occurs when waking up my MacBook or when attaching/detaching external displays.

milosdjakovic avatar Feb 21 '24 17:02 milosdjakovic

still happen sometime, it pushes me still use item2 for my primary tool : (

silent-tan avatar Apr 03 '24 08:04 silent-tan

I don't even need sleep for it to do this anymore. It just randomly switches when it feels like it.

itmustbejj avatar Jul 23 '24 16:07 itmustbejj

Any update on this? It would be really great to have this fixed 🥺

paul-voelker avatar Sep 20 '24 08:09 paul-voelker

Hey folks, as a possible workaround to this issue, You may need to go to Mac > System Settings > Desktop & Dock , then enable "Displays have separate Spaces" and the "Active" screen hotkey settings should work after sleep. Please let us know if that helps with your issue.

dannyneira avatar Oct 04 '24 22:10 dannyneira

A user commented on #5352

But doing that, it only works properly if I have nothing in fullscreen mode on the Active screen. At the moment that I open an App in fullscreen, then using the hotkey opens the Warp terminal in the other screen.

dannyneira avatar Oct 07 '24 16:10 dannyneira

This happens to me and I don't think it has anything to do with the laptop going to sleep. (Should I create a separate issue, then?)

  • This is incredibly frustrating because I use the hotkey window as my only terminal window and having it jump to random screens at random times and requiring me to manually fix it pulls me out of flow state.
  • I have my hotkey window set to always open on "Main screen", which is not my laptop screen.
  • When it happens, I can get it to go back to the main screen by opening warp settings > features > global hotkey > screen dropdown already has "main screen" selected, but if I open it and re-select "main screen" then the window jumps to the main screen

Warp settings

Image

External display is Main display

Image

"Displays have separate spaces" is enabled

Image

atuttle avatar Jan 16 '25 22:01 atuttle

Hey folks, as a possible workaround to this issue, You may need to go to Mac > System Settings > Desktop & Dock , then enable "Displays have separate Spaces" and the "Active" screen hotkey settings should work after sleep. Please let us know if that helps with your issue.

I have the "Displays have separate Spaces" setting on and use the "Main" screen hotkey setting and it still jumps to the non-main screen regularly ☹️ A fix for this would be really great!

paul-voelker avatar Jul 15 '25 09:07 paul-voelker

As others have mentioned already, it doesn't have to go to sleep for it to happen. It's just random when switching between fullscreen apps and different desktops. The hotkey window won't show up in the intended screen even when no fullscreen app is active there. I confirm that the current "fix" is going to settings and re-selecting the desired target window. And that's really annoying. Would it be possible to show the terminal on top of fullscreen apps in the future? (I know that's not currently possible). Related https://github.com/warpdotdev/Warp/issues/4808

dportalesr avatar Nov 07 '25 21:11 dportalesr