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

Fork Keyboard Shortcuts #309

Open
DanPristupov opened this issue Jun 12, 2018 · 32 comments
Open

Fork Keyboard Shortcuts #309

DanPristupov opened this issue Jun 12, 2018 · 32 comments

Comments

@DanPristupov
Copy link
Contributor

DanPristupov commented Jun 12, 2018

General Navigation
  • 1 - Show Changes view (second press will focus commit field)
  • 2 - Show All Commits view (second press will jump to HEAD)
  • 0 - Reveal HEAD
  • P - Show Quick Launch window
  • Tab - Select next tab
  • Tab - Select previous tab
  • T - Open new tab
  • W - Close current tab
  • , - Open Fork preferences
All Commits View
  • 0 - Jump to HEAD
  • F - Commit search
    • Return - Jump to next search result
    • Return - Jump to previous search result
  • C - Copy commit info
  • - Remove branch/stash
  • A - Filter by active branch
Changes View
  • Return - Commit
  • Return - Commit and push
  • 1 - Focus commit message field
  • Return, S - Stage/unstage selected file (or lines)
  • S - Stage/unstage all files
  • , D - Discard selected file (or lines)
  • O - Open selected file
  • D - Open selected file in external diff tool
  • C - Copy selected file full path
Repository
  • R - Refresh
  • CtrlShiftN - Init new repository
  • N - Clone new repository
  • O - Open repository
  • F - Fetch
  • F ( + click on button) - Quick Fetch
  • L - Pull
  • L ( + click on button) - Quick Pull
  • P - Push
  • P ( + click on button) - Quick Push
  • B - New branch
  • T - New tag
  • H - Create stash
  • H - Quick Stash
  • O - Open in File Explorer
  • T - Open in Terminal
@DanPristupov DanPristupov changed the title Shortcuts Fork Shortcuts List Jun 12, 2018
@djbe
Copy link

djbe commented Jul 12, 2018

Commit view: cmd + enter triggers the "Commit x Files" button

@DanPristupov DanPristupov changed the title Fork Shortcuts List Fork Keyboard Shortcuts Mar 9, 2020
@DanPristupov DanPristupov pinned this issue Mar 9, 2020
@KentVu
Copy link

KentVu commented Mar 10, 2020

Not sure if this was reported but:
the ⌘⇧B - New branch command should create branch at the highlighted commit.
It's currently always create a new branch at the same commit of the checked out branch.
Please check!

Edit: OK this was reported :') #128

@SassNinja
Copy link

Something I'd really appreciate is an option to override all those shortcuts so you can customize git-fork the way you can work best.

@JessyCatterwaul
Copy link

JessyCatterwaul commented Jun 11, 2020

The shortcut for Open is horrible, and I use that function a lot. Can we get a better one? In SourceTree, I typically double-click because I'm probably mousing when using this feature. Considering that's taken, in Fork, a modified click is really what I'd prefer.

@DevilDimon
Copy link

Any way to add ⌘+. to stop all current operations (as in Xcode, Terminal and elsewhere in the OS)?

@pmlandwehr
Copy link

I'd like to put in a bid for j and k to navigate up and down items in the active pane. Much easier than up-arrow and down-arrow on a laptop keyboard, at least for me.

@infotexture
Copy link

infotexture commented Oct 12, 2020

Something I'd really appreciate is an option to override all those shortcuts

@SassNinja On macOS, you can customize shortcuts for any command that appears in a menu via System Preferences > Keyboard > Shortcuts > App Shortcuts — so as long as it's in a menu somewhere, you can change it yourself.

@Tricertops
Copy link

Tricertops commented Feb 26, 2021

@infotexture The issue is that not all of them are in the main menu, especially not those that operate on currently selected commit or file.

I already customized this way quick actions: Quick Push ⌘P, Quick Pull ⌘L, Quick Stash ⌘H, and their non-quick variants using ⌥ key. However, this customization only works if:

  1. The action is in the main menu, even if hidden (some Fork actions are not).
  2. The shortcut must use ⌘ key (so can’t override Space, Return, or even double-click).

Regarding the above points, Fork should:

  1. Expose commit and file actions in the main menu.
  2. Allow customizing the non-⌘ actions in the preferences.

cc @DanPristupov

@Tricertops
Copy link

@DanPristupov You should mention that Space opens side-by-side diff of selected file.

The shortcut for opening a selected file should really be more accessible than opening a new repo. I would suggest to have Open File as ⌘O and Open Repo as ⇧⌘O.

As a long-time SourceTree user, I’m quite used to double-click to open file and Space to stage/unstage a file. I’m trying to get used to the ⌘S, since I didn’t know about the Return key. However, opening a file using ⌥⇧⌘O is too much 😆

@tkainrad
Copy link

KeyCombiner now has a table of all Fork keyboard shortcuts that are listed in this issue and its Windows counterpart: https://keycombiner.com/collections/fork/macos/

It can be searched and filtered.

While creating this resource, I noticed that the macOS version of Fork does not have the Zoom in/out, Filter, Rename Repository, and Remove Repository shortcuts that the Windows version has. Is this correct or is it just missing in this issue?

image

@konclave
Copy link

It would be nice to have a shortcut that set focus to Unstaged and Staged files lists. Because if you get to the "uncommited changes" view with the Cmd-1 shortcut, you can get to the Staged files list only with the mouse click. By pressing "tab" key it focuses only one of the lists that has focus the last and skips another.
E.g.: on All changes press Cmd-1. You're moved to Uncommeted changes with the focus set to Unstaged list. Press Cmd-1. Focus is the "Commit subject" field. Now I can move back to the Unstaged list with the tab key, but Staged list is unreachable.
If I focus Staged list with the mouse, then I can move with the tab to the "Commit subject" and back, but Unstaged list is unreachable.

@DanPristupov
Copy link
Contributor Author

Now I can move back to the Unstaged list with the tab key, but Staged list is unreachable.

Tab switches unstaged -> staged -> commit subject -> description. Shift+Tab switches backward. The focus might not be visible when there's no item selected, but it's there.

@konclave
Copy link

konclave commented Dec 1, 2021

Tab switches unstaged -> staged -> commit subject -> description. Shift+Tab switches backward. The focus might not be visible when there's no item selected, but it's there.
Thanks. It's really there, just need to select some file with the arrows.

@AndrewSouthpaw
Copy link

AndrewSouthpaw commented Dec 31, 2021

[UPDATE] Nevermind seems to have been an ephemeral problem, restarting Fork fixed the issue.

So, it used to do this cycle for Tabs...

https://i.imgur.com/AEAIewP.jpg

But recently that changed, and now it goes to the toolbar for the diff window:

https://i.imgur.com/6aOt5vi.jpg

I'd love to see the old cycle come back, because it was much more ergonomic. Now I can't stay keyboard only with Fork. 😞

@konclave
Copy link

Is there a hotkey to switch between Branches - Stashes - Search commits tabs?

@DanPristupov
Copy link
Contributor Author

@konclave no, there's no keyboard shortcut for that. And since we are here, please read my comment in the other topic: #1696 (comment).

@NSErfan
Copy link

NSErfan commented Apr 17, 2023

Hey @DanPristupov, I used to be able to do ⌘ + B and get a search field to checkout a branch and that has stopped working as of version 2.28. That's quite handy. Could you please bring that back?

@niorko
Copy link

niorko commented Apr 18, 2023

Hey @DanPristupov, I used to be able to do ⌘ + B and get a search field to checkout a branch and that has stopped working as of version 2.28. That's quite handy. Could you please bring that back?

I also have the same issue 😭. Please bring it back. 🙏

@DanPristupov
Copy link
Contributor Author

Can you use Cmd+P -> Checkout instead?

@matthewjamesadam
Copy link

@DanPristupov I used Cmd+B very often as well. Cmd+P -> Checkout -> branchname feels pretty cumbersome in comparison.

@NSErfan
Copy link

NSErfan commented Apr 19, 2023

Yeah, and we still have ⌘ + shift + B to create a new branch which is handy as well. But I checkout branches way more often than creating new branches, so bringing back the sibling shortcut ⌘ + B to checkout would be super useful.

@leshque
Copy link

leshque commented Apr 28, 2023

Same here, after the update I really miss the Cmd+B shortcut to switch between branches.

@tomaskraina
Copy link

tomaskraina commented May 3, 2023

I have to agree what was written above. I got to this issue out of frustration that CMD+B stopped working and I could not find a menu item with a shortcut to do that.

Using CMD+P is suboptimal and degrades the UX for me quite a bit.

@DanPristupov Could you please reconsider adding checkout branch menu item + shortcut back?

@NSErfan
Copy link

NSErfan commented May 15, 2023

Hey @DanPristupov, thanks for bringing back ⌘+B for checkout. I've been checking for updates almost every day, and I got really happy when I saw the update today. :)

@ConstantineLoutas
Copy link

Hey @DanPristupov, something changed recently and the Quick Launch... option is now invoked by both:

  • P (documented above, so intentional), and
  • O (undocumented, probably unintentional).

If the latter was indeed unintentional, can we get it back? I was using it for something else and now Quick Launch... takes precedence 😅

@ottob
Copy link

ottob commented Nov 3, 2023

If I'm in the commit list and use ⌘ F to search for something, I can not then use ⌘ G to search for the next matching item. Can you please add this?

@clementlize
Copy link

Hi there, would be great to have a shortcut to check the "amend" checkbox in the Changes View :)

@clementlize
Copy link

Also, I find the shortcut to create a tag sometimes misleading, as it creates a tag on the checked out commit and not the one selected (in blue)

@SebKranz
Copy link

SebKranz commented Feb 15, 2024

Hi there, would be great to have a shortcut to check the "amend" checkbox in the Changes View :)

A

@zev-levitramos-zocdoc
Copy link

zev-levitramos-zocdoc commented Mar 7, 2024

@DanPristupov hey! It seems like there might be a small oddity when hitting delete to remove a highlighted branch or stash.
It seems that if the branch filter is on for the current branch, and you highlight a different branch and press delete nothing happens. It only works fine when the branch filter is off and the commit pane is able to highlight the specific commit head for the non-current branch.

Not sure if this is intentional, but can be a little confusing as to why it doesn't work.

@ian-h-chamberlain
Copy link

ian-h-chamberlain commented Jun 12, 2024

The shortcut for opening a selected file should really be more accessible than opening a new repo. I would suggest to have Open File as ⌘O and Open Repo as ⇧⌘O.

@Tricertops — I know you posted this a while ago, but maybe this will help you or others who are looking for this functionality... as others have mentioned, macOS actually allows you to customize these shortcuts and I found this configuration worked for me in System Settings > Keyboard > Keyboard Shortcuts... > App Shortcuts:

Screenshot 2024-06-12 at 12 26 40

The first shortcut triggers the File > Open... dialog, and the second option triggers the context menu Open command that appears when you right-click/ctrl-click a file. Hope this helps if you are still looking for that funcitonality!

Edit: From Apple's documentation, it seems like maybe it would be less ambiguous/more correct to use File->Open... as the shortcut action:
Screenshot 2024-06-12 at 12 35 49

Both seem to work for me but specifying the File menu "feels better", I guess 😆

@fo-fo
Copy link

fo-fo commented Nov 27, 2024

@Tricertops — I know you posted this a while ago, but maybe this will help you or others who are looking for this functionality... as others have mentioned, macOS actually allows you to customize these shortcuts and I found this configuration worked for me in System Settings > Keyboard > Keyboard Shortcuts... > App Shortcuts:

thanks for this! the default shortcut (⌘⌥⇧O) for opening the selected file didn't work for me on a fresh install, but i was able to re-bind it with this tip!

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