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

Bind ⌘R to Send button #36

Closed
1 task done
ctessmer opened this issue Sep 6, 2022 · 3 comments
Closed
1 task done

Bind ⌘R to Send button #36

ctessmer opened this issue Sep 6, 2022 · 3 comments

Comments

@ctessmer
Copy link

ctessmer commented Sep 6, 2022

Checklist

  • I've searched for similar feature requests.

Enhancement request

Bind ⌘R to Send button instead of Reload.

Problem it solves

TL;DR

Pressing ⌘R refreshes the contents of the Httpie desktop window—instead of resending the request.

Details

This sequence is muscle memory for web developers:

  1. Update code in editor
  2. Save via ⌘S (cmd + s]
  3. Switch to browser via ⌘Tab [cmd + tab]
  4. Refresh page (aka: resend request) via ⌘R (cmd + r]
  5. Inspect changes

Rinse & repeat.

Now replace the browser with Httpie desktop.

Same muscle memory, different outcome. Now, when pressing ⌘R in step 4, the whole contents of the Httpie app window updates instead of just resending the request as is intended.

Currently we're forced to reposition the mouse over the Send button and click each time to resend the current request.

I mean… how are we even supposed to live?! 🤣

@wlkns
Copy link

wlkns commented Nov 12, 2023

Bump. This issue is also affecting me and another. You naturally expect ⌘R to resend/refresh the request but instead the entire window reloads.

@wlkns
Copy link

wlkns commented Nov 21, 2023

@ctessmer I've got an interim solution for you and perhaps others with this issue... muscle memory means it became a repeated issue for me and I was about to ditch Httpie...

Toggle developer tools (View menu at top)

In the console, enter the following —

window.addEventListener("keydown", (e) => {
  if ( ["s", "r"].includes(e.key) && e.metaKey ) {
    e.preventDefault();
    document.querySelector('[data-testid="url-bar-submit"]').click()
  }
})

This will intercept and Cmd+S or Cmd+R and click the send button, so should be compatible with updates etc.

@jkbrzt
Copy link
Member

jkbrzt commented Jan 3, 2024

🚢 Shipped in v2024.1.1 →

@jkbrzt jkbrzt closed this as completed Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants