flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

Hot reload keyboard shortcut Ctrl+\ no longer works

Open gnprice opened this issue 1 year ago • 9 comments

Steps to Reproduce

In Android Studio Hedgehog (the version now approaching stable release), the keyboard shortcut Ctrl+\ for hot reload no longer works.

The "Flutter Hot Reload" button is still there — up in the toolbar at the top in the same row with "Run" and "Debug", as well as down in the "Run" tool window. If I press the button with the mouse it still works. Hovering on the button, it also still reports Ctrl+\ as a keyboard shortcut.

But if I hit Ctrl+\ , nothing happens.

This was working fine for me in Flamingo. I recently upgraded to Hedgehog, skipping Giraffe.

This issue applies both with and without the New UI.

Version info

$ flutter doctor -v
[!] Flutter (Channel [user-branch], 3.16.0-17.0.pre.37, on Debian GNU/Linux 10 (buster)
    4.19.0-25-amd64, locale en_US.UTF-8)
    ! Flutter version 3.16.0-17.0.pre.37 on channel [user-branch] at /home/greg/n/flutter/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at
      https://flutter.dev/docs/get-started/install.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
    • Framework revision 1c90ed8b64 (38 minutes ago), 2023-10-25 13:24:15 -0700
    • Engine revision 6e09ee14e2
    • Dart version 3.3.0 (build 3.3.0-56.0.dev)
    • DevTools version 2.28.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to
      use "git" directly to perform update checks and upgrades.

[…]
[✓] Android Studio (version 2023.1)
    • Android Studio at
      /home/greg/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/231.9392.1.2311.10949950
    • Flutter plugin version 75.1.3
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

gnprice avatar Oct 25 '23 21:10 gnprice

I have the same issue. Remapping the keymap for 'Flutter Hot Reload' also has no effect.

jimmyszeles avatar Oct 26 '23 08:10 jimmyszeles

after update on my mac it's Option+Command+ \ ++\ instead of just command + slash ⌘ \ that's sux

kalaganov avatar Dec 01 '23 09:12 kalaganov

after update on my mac it's Option+Command+ \ ⌥ +⌘+\ instead of just command + slash ⌘ \ that's sux

Confirming that. New shortcut for Hot Reload in Windows is CTRL+ALT+\

Antwen97 avatar Dec 01 '23 09:12 Antwen97

Interesting — that's a useful workaround, then.

I just tried in Android Studio Giraffe (the version before this issue arose), and Ctrl+Alt+\ works there for a hot reload as well as Ctrl+\ . So it seems like

  • both Ctrl+\ and Ctrl+Alt+\ are meant to work;
  • in Hedgehog, something is causing Ctrl+\ to not work.

gnprice avatar Dec 01 '23 17:12 gnprice

It seems there are conflicting hotkeys ("Root Directory" and "Manual Live Edit") for Ctrl+\ in Android Studio. I'm assuming the issue somehow arose with the latest Android Studio release.

Removing the conflicting hotkeys allows Ctrl+\ to work just fine again. I'm not personally recommending removing the conflicts because you might prefer them, but if you don't care about them, you can do the following:

  1. Settings > Keymap > "Expand Plugin directory" > "Expand Flutter directory"
  2. Locate the Hot Reload hotkey
  3. Remove the Hot Reload hotkey
  4. Reassign the Hot Reload hotkey to Ctrl+\, which will notify you about the conflicting keys
  5. Click "Remove" when asked what to do about the conflicting hotkeys

kwill39 avatar Dec 06 '23 06:12 kwill39

The new shortcut for mac proposed here says performing hot restart but goes ahead to do a full quick rebuild and app resumes from homepage. Not cool. Still waiting for real mac shortcut approved by the/a new update and not new key mappings.

billachusim avatar Dec 10 '23 21:12 billachusim

UPDATE: As simple as "Command S" does it for me on mac.

billachusim avatar Dec 11 '23 04:12 billachusim

Quick fix: navigate to the keymap settings, locate "Manual Live Edit" and either assign a different shortcut or remove its shortcut.

Hieu86355 avatar Dec 12 '23 01:12 Hieu86355

It seems there are conflicting hotkeys ("Root Directory" and "Manual Live Edit") for Ctrl+\ in Android Studio. I'm assuming the issue somehow arose with the latest Android Studio release.

Removing the conflicting hotkeys allows Ctrl+\ to work just fine again. I'm not personally recommending removing the conflicts because you might prefer them, but if you don't care about them, you can do the following:

  1. Settings > Keymap > "Expand Plugin directory" > "Expand Flutter directory"
  2. Locate the Hot Reload hotkey
  3. Remove the Hot Reload hotkey
  4. Reassign the Hot Reload hotkey to Ctrl+\, which will notify you about the conflicting keys
  5. Click "Remove" when asked what to do about the conflicting hotkeys

Thanks ✅

tinhnvc-gadget avatar Feb 16 '24 02:02 tinhnvc-gadget