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 #333

Open
TanyaPristupova opened this issue Jun 20, 2019 · 113 comments
Open

Fork Keyboard Shortcuts #333

TanyaPristupova opened this issue Jun 20, 2019 · 113 comments

Comments

@TanyaPristupova
Copy link
Collaborator

TanyaPristupova commented Jun 20, 2019

General Navigation
  • Ctrl1 - Show Changes view (second press will focus commit field)
  • Ctrl2 - Show All Commits view (second press will jump to HEAD)
  • Ctrl0 - Reveal HEAD
  • CtrlP - Show Quick Launch window
  • CtrlTab - Select next tab
  • CtrlShiftTab - Select previous tab
  • CtrlT - Open new tab
  • CtrlW - Close current tab
  • Ctrl=/Ctrl- Zoom in/ Zoom out
  • Ctrl, - Open Fork preferences
All Commits View
  • Ctrl0 - Jump to HEAD
  • CtrlF - Commit search
    • Enter, F3 - Jump to next search result
    • ShiftEnter, ShiftF3 - Jump to previous search result
  • CtrlC - Copy commit info
  • Delete - Remove branch/stash
  • CtrlShiftA - Filter by active branch
Changes View
  • CtrlEnter - Commit
  • CtrlShiftEnter - Commit and push
  • Ctrl1 - Focus commit message field
  • CtrlF - Filter
  • Enter, CtrlShiftS - Stage/unstage selected file (or lines)
  • CtrlAltShiftS - Stage/unstage all files
  • Backspace, CtrlShiftD - Discard selected file (or lines)
  • CtrlO - Open selected file
  • CtrlD - Open selected file in external diff tool
  • CtrlC - Copy selected file full path
Repository
  • F5 - Refresh
  • CtrlShiftN - Init new repository
  • CtrlN - Clone new repository
  • CtrlO - Open repository
  • CtrlShiftF - Fetch
  • CtrlAltShiftF (Ctrl + click on button) - Quick Fetch
  • CtrlShiftL - Pull
  • CtrlAltShiftL (Ctrl + click on button) - Quick Pull
  • CtrlShiftP - Push
  • CtrlAltShiftP (Ctrl + click on button) - Quick Push
  • CtrlShiftB - New branch
  • CtrlShiftT - New tag
  • CtrlShiftH - Create stash
  • CtrlAltO - Open in File Explorer
  • CtrlAltT - Open in Terminal
Repository Manager
  • F2 - Rename Repository
  • Delete - Remove Repository
  • Enter - Open Repository
@DanPristupov DanPristupov pinned this issue Jun 20, 2019
@Otiel
Copy link

Otiel commented Jun 21, 2019

  • CtrlAltShiftF (Ctrl + click on button) - Quick Fetch
  • CtrlAltShiftL (Ctrl + click on button) - Quick Pull
  • CtrlAltShiftP (Ctrl + click on button) - Quick Push

Teasing for a future version? 😆

@jerone
Copy link

jerone commented Jun 21, 2019

Wiki or the Readme would be a better place for this. This issue will go unnoticed.

@DanPristupov
Copy link
Contributor

Teasing for a future version? 😆

Not only this, but also the filter in the Changes view :)

  • CtrlF - Filter

@circleupx
Copy link

Wiki or the Readme would be a better place for this. This issue will go unnoticed.

Please consider making this a wiki

@thibaultmeyer
Copy link

Please add "Delete" to delete selected branch

@matheuslopesdev
Copy link

matheuslopesdev commented Jul 10, 2019

Hi, It would be great to have an "Apply stash" shortcut

@PsyhoBelka
Copy link

is any keys to navigate between commits inside current branch? not up/down in general commits list - only between currently selected branch (like in Intelij IDEA, you can pres left/right to navigate prev/next commit in current branch)

@aodpi
Copy link

aodpi commented Jul 15, 2019

Is it possible to change the shortcuts in settings?

@krumeich
Copy link

krumeich commented Aug 19, 2019

Thanks for adding zoom in/out with ctrl+/ctrl-.
Please consider adding ctrl= to reset zoom.

@lorenzo-arena
Copy link

Can you consider also adding another shortcut to open an explorer instance pointing to a selected file?

@sm-g
Copy link

sm-g commented Sep 20, 2019

What does Spacebar when file in staged/unstaged change list selected? Unnamed window with diff opened. There is no such command in context menu of file. (I expect it to work like in SourceTree - move between staged/upstaged)

@DanPristupov
Copy link
Contributor

What does Spacebar when file in staged/unstaged change list selected?

It opens large window with diff.

I expect it to work like in SourceTree - move between staged/upstaged

It's not related.

@samizzo
Copy link

samizzo commented Sep 21, 2019

Another vote here for changing shortcuts!

@odalet
Copy link

odalet commented Sep 29, 2019

On my French keyboard, Zoom in works, but Zoom out (Ctrl+-) does not.
And a way to reset the zoom level to its default would be great too!

Should I fill a separate issue?

EDIT:

I've dug a bit and it appears that the OemMinus key simply does not exist on French keyboards (or more precisely, the VK_OEM_MINUS code is never raised on French keyboards... see https://stackoverflow.com/questions/12634190/vk-oem-minus-doesnt-work-on-azerty-keyboard).

I don't know exactly how you bind zoom in/out commands to actual zooming, but I suspect you rely on WPF Key Gestures. I came with a prototype that allows French keyboards to kinda work given it has a numpad:

public static class CustomCommands
{
    public static readonly RoutedUICommand ZoomIn = new RoutedUICommand(
        "Zoom In", "ZoomIn", typeof(CustomCommands), new InputGestureCollection
        {
            new KeyGesture(Key.Add, ModifierKeys.Control), // This is the "numpad +" key
            new KeyGesture(Key.OemPlus, ModifierKeys.Control), // This is the "+, =, }" key on a French Keyboard
        });

    public static readonly RoutedUICommand ZoomOut = new RoutedUICommand(
        "Zoom Out", "ZoomOut", typeof(CustomCommands), new InputGestureCollection
        {
            //new KeyGesture(Key.D6, ModifierKeys.Control), // This is the "6, -, |" key on a French Keyboard
            new KeyGesture(Key.Subtract, ModifierKeys.Control), // This is the "numpad -" key
            new KeyGesture(Key.OemMinus, ModifierKeys.Control),// This does not work on a French Keyboard
        });
}

The solution above should work without needing full internationalization of shortcuts.

On the other hand, if you can go the i18n way, then replacing Key.OemMinus with Key.D6 only in the fr-FR case would allow us French to Zoom out on notebook French keyboards as well.

PS: it is kind of weird to have the shortcut display "Ctrl+=" for zoom in where logically it is bound to '+' and visually (at least on US/French keyboards, + and = are on the same key

Hope this helps

@rog1039
Copy link

rog1039 commented Oct 1, 2019

CtrlAltShiftS - Stage/unstage all files >> Does not work on my computer running 1903 Windows 10. Windows opens the built-in sticky note app instead.

@DanPristupov
Copy link
Contributor

@odalet we added handling of Key.Subtract in Fork 1.40.

it is kind of weird to have the shortcut display "Ctrl+=" for zoom in where logically it is bound to '+' and visually (at least on US/French keyboards, + and = are on the same key

This is a common approach. VS Code also uses "Ctrl+=" (https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf)

@odalet
Copy link

odalet commented Oct 5, 2019

@DanPristupov
Thanks for the quick fix!
Then it may be a good idea to also support Ctrl+NumPad+ for zooming in (VS Code does); this would make it easier to zoom in/out because of proximity on the keyboard.
Concerning a Reset zoom command, VS Code supports Ctrl+Numpad0. Other tools (eg. Notepad++) use Ctrl+Numpad/...

Anyway, thanks again! By the way, if you ever accept contributions I'd be glad to help: I'm a professional .NET developer and know some WPF. I use fork on a daily basis and find it wonderful; it has completely replaced Sourcetree for my Gui needs. So, if you ever consider contributions, do not hesitate reaching out to me!

@jasenmoloy
Copy link

Can we add Ctrl + B as a shortcut to checkout a branch? This is already implemented on the Mac OS version.

Adding this feature makes it a lot easier to checkout a remote branch during a PR than having to search through a large list of remote branches in the sidebar.

@DanPristupov
Copy link
Contributor

@jasenmoloy did you try to use the CtrlP -> checkout? It provides pretty similar experience in my opinion.

@valhristov
Copy link

Could you add F2 as shortcut to rename a branch?

@szyb
Copy link

szyb commented Oct 23, 2019

Is it possible to provide functionality that user would be able to change default keybindings?

@svennergr
Copy link

Can we get Quick Fetch/Quick Pull/Quick Push also in the Quick Launch command palette?

@SaebAmini
Copy link

Ctrl Alt Shift F to Quick Fetch doesn't work for me, but (Ctrl + click on button) and other "Quick xxx" operations work.

@SaebAmini
Copy link

Could you add CTRL R as an alternative to F5

@Otiel
Copy link

Otiel commented Nov 6, 2019

Ctrl Alt Shift F to Quick Fetch doesn't work for me, but (Ctrl + click on button) and other "Quick xxx" operations work.

#411

@NN---
Copy link

NN--- commented Nov 6, 2019

Is there a shortcut to filter branches tree ?

@Otiel
Copy link

Otiel commented Nov 6, 2019

Is there a shortcut to filter branches tree ?

CtrlF but it must be used when focus is on the left navigation pane.

@deuterium2h
Copy link

Are there any shortcuts regarding collapse and expand commit history? As of now Left and right arrow keys collapse and expands the commit history for the current branch.

@DanPristupov
Copy link
Contributor

@deuterium2h only the ones you mentioned.

@MaksimKuz
Copy link

Can you add shortcuts to navigate in difference view (when "Show entire file" mode is On) between code changes.

@ghost
Copy link

ghost commented Dec 21, 2022

My team is always rebasing our branches to keep our commit history as readable and clean as possible, so I would love a shortcut for force pushing a branch!

@DanPristupov
Copy link
Contributor

@ShannonTheCodePerson use [branch icon on the toolbar] -> Sync. You can find more info here: #1432

@carsten-goforlag
Copy link

Please consider adding a shortcut for "Create Pull Request..." command

@bbukraLTX
Copy link

Please consider adding shortcuts for custom commands. Ideally with an option to set the shortcuts manually. 🙏

@mihben
Copy link

mihben commented Jan 16, 2023

Please consider adding shortcuts for custom commands. Ideally with an option to set the shortcuts manually. 🙏

Here is a feature request for it. Please upvote it. (It is a little bit old :))

@bbukraLTX
Copy link

bbukraLTX commented Jan 16, 2023

Here is a feature request for it. Please upvote it. (It is a little bit old :))

Sorry, what should I upvote? 😅
Edit: Nvm, found it and upvoted :)

@bbukraLTX
Copy link

Please also add a shortcut to jump to parent commit (one for each if there's more than one)

@mihben
Copy link

mihben commented Jan 24, 2023

Here is a feature request for it. Please upvote it. (It is a little bit old :))

Sorry, what should I upvote? 😅 Edit: Nvm, found it and upvoted :)

It is a good question, sorry. 😄
Here you can find: #1138

@stefan-van-de-griendt-quandago

Is there a way to navigate to the next commit on the same branch? (might want to add: in the All Commits view)
for example, like collapsing the tree and go to the next commit without collapsing the tree

I still can't find a shortcut for this, but it's really common for us to have multiple active branches. So, navigating manually by following a line in the graph is really inconvenient. Would love to have Ctrl + Up and Ctrl + Down for the most common scenarios, which is moving in the same branch. There could be some edge cases, such as

  • Ctrl + Down into the originating branch, because this is the first commit of the current branch and there's only one parent;
  • Ctrl + Up into the target branch, because this is the last commit of the current branch and there's only one child;
  • Ctrl + Down when there are multiple parents, but there's no parent commit on the same branch, then nothing happens, else goes to the previous commit on the current branch;
  • Ctrl + Up when there are multiple children, but there's no child commit on the same branch, then nothing happens, else goes to the next commit on the current branch.

@ZihouWong
Copy link

Please consider adding a shortcut for "Chekcout " command

@bbukraLTX
Copy link

@ZihouWong Please upvote this issue (from Mac Tracker)

@JustinasKilas
Copy link

Please consider adding a shortcut for "Create Pull Request..." command

Also 3rd option "Commit and Push and Create Pull Request" would be awsom!!
image

@HongliangQiu
Copy link

Please consider adding a shortcut for "Switch Workspace" command. Thanks.
image

@carun
Copy link

carun commented Aug 1, 2023

Please consider adding shortcut for "Open in Visual Studio Code". Thanks!

image

@TiloBuechsenschuss
Copy link

A shortcut to switch between commit sorting (topologically or by date) would be helpful. :-)

@heythisischris
Copy link

Please consider adding a shortcut for "Switch Workspace" command. Thanks. image

+1 for adding a shortcut to switch workspaces! One of the most powerful features of Fork IMO.

@carun
Copy link

carun commented Aug 20, 2023

Ability to add/customize the shortcuts would probably cover all new requests.

My personal favorite is to open with VS Code with Ctrl .

@christianfriessnegg
Copy link

christianfriessnegg commented Oct 4, 2023

I would really enjoy having keyboard shortcuts (any maybe 2 buttons for GUI lovers) for "go to next change" / "previous change" in the changes view:
image
This would make the review of changes a lot faster in my opinion.
Currently I have to use the "workaround" of using external diff-tool BeyondCompare and using that:
image

@AndriiPetrovDev
Copy link

just tried Fork and I can't believe that it doesn't have such basic stuff as resolving conflicts hotkeys

@andgeno
Copy link

andgeno commented Mar 13, 2024

I'd love to see a native (customizable) shortcut for switching between workspaces quickly.

As a workaround for now, I wrote this AutoHotkey script (Windows only, obviously):

#Requires AutoHotkey v2.0
#SingleInstance

;;
;; Triggers "Switch Workspace" action on "`" key press
;;
#HotIf WinActive("ahk_exe Fork.exe")
`::
{
    Send "^p"
    SendText "Switch Workspace"
    Sleep 250
    Send "{Enter}"
}

@Northwind877
Copy link

Is there a way to navigate to the next commit on the same branch? (might want to add: in the All Commits view)
for example, like collapsing the tree and go to the next commit without collapsing the tree

I still can't find a shortcut for this, but it's really common for us to have multiple active branches. So, navigating manually by following a line in the graph is really inconvenient. Would love to have Ctrl + Up and Ctrl + Down for the most common scenarios, which is moving in the same branch. There could be some edge cases, such as

  • Ctrl + Down into the originating branch, because this is the first commit of the current branch and there's only one parent;
  • Ctrl + Up into the target branch, because this is the last commit of the current branch and there's only one child;
  • Ctrl + Down when there are multiple parents, but there's no parent commit on the same branch, then nothing happens, else goes to the previous commit on the current branch;
  • Ctrl + Up when there are multiple children, but there's no child commit on the same branch, then nothing happens, else goes to the next commit on the current branch.

Are there any shortcuts for "Go to child commit" and "Go to parent commit " now? Unfortunately I couldn't find out, I work on a Mac. Thank you!

@0papen0
Copy link

0papen0 commented May 27, 2024

What about a shortcut for the Amend check-box when on the Changes View?
image

@bbukraLTX
Copy link

@0papen0 cmd+shift+a works for me

@0papen0
Copy link

0papen0 commented May 28, 2024

@0papen0 cmd+shift+a works for me

Doesn't seem to do anything for me on win, sadly. But thanks.

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