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

[Feature Request] Add Keyboard shortcuts to focus Staged/Unstaged Files and Commit Message #233

Open
opus131 opened this issue Apr 15, 2019 · 14 comments
Milestone

Comments

@opus131
Copy link

opus131 commented Apr 15, 2019

With those shortcuts, many of the common workflows can be completed without ever touching the mouse. Would be a tremendous improvement.

Thank you for creating a great product!

@opus131 opus131 changed the title [Feature Request] Add Keyboard shortcuts to focus Staged/Unstages Files and Commit Message [Feature Request] Add Keyboard shortcuts to focus Staged/Unstaged Files and Commit Message Apr 15, 2019
@DanPristupov
Copy link
Contributor

DanPristupov commented Apr 15, 2019

I will investigate the behavior. May be Fork should focus to the Unstaged list automatically on opening the Changes view.

@opus131
Copy link
Author

opus131 commented Apr 16, 2019

Thank for you looking into this. Automatically focusing the Unstaged list would definitely help a lot already, but a keyboard shortcut for focusing the commit message would still be great. Ideally, a user should not be required to ever touch the mouse/trackpad for this common workflow:

  1. Cylce through repos for the one you want: ✔️ ctrl+tab
  2. Focus "Changes": ✔️ ctrl+1
  3. Focus file in "Unstaged files" list: ❌ no shortcut (yes, you can get there by hitting tab several times, but since there is no focus-highlight it's not great UX)
  4. Do stuff with the staged/unstaged files: ✔️ enter, delete
  5. Focus commit message: ❌ no shortcut
  6. Commit: ✔️ ctrl+enter - (ideally there would be a dedicated shortcut for "Commit & Push", maybe smth like ctrl+shift+enter)

So as it stands, the workflow can be mostly completed with only using the keyboard, except for two steps.

@DanPristupov
Copy link
Contributor

Focus commit message: ❌ no shortcut

Ctrl+1 when you are in the changes view (or double Ctrl+1 if you are not). This is a hidden one :).

(ideally there would be a dedicated shortcut for "Commit & Push", maybe smth like ctrl+shift+enter)

Good idea 👍

Actually I need to create a public available list of shortcuts.

@opus131
Copy link
Author

opus131 commented Apr 16, 2019

Thank you again for your quick reply.

Ctrl+1 when you are in the changes view (or double Ctrl+1 if you are not). This is a hidden one :).

That's good to know - the trouble with this one is that it's one-way: after focusing the commit message via ctrl+1 you cannot get back to the unstaged/staged changes via a keyboard shortcut; however quite often while composing a commit message, a user might switch back to the changed files to check some details or copy smth from the code.

Having distinct shortcut to focus each of those panel, the way e.g. GitExtensions does it - is pretty much ideal:
image

@DanPristupov DanPristupov added this to the 1.32 milestone May 16, 2019
@DanPristupov
Copy link
Contributor

I forgot to mention that 1.32 contains many improvements related to keyboard navigation.

@DanPristupov
Copy link
Contributor

Fork Keyboard Shortcuts

@TomGit27
Copy link

TomGit27 commented Feb 4, 2021

I second this request. A shortcut to focus the unstaged and staged files list allows for better keyboard navigation.

Example
Ctrl+1 focus commit message
Ctrl+2 focus unstaged file list
Ctrl+3 focus staged file list

Too bad Ctrl+2 is already in use. Maybe Ctrl+3 and Ctrl+4 can be used instead.

@DanPristupov
Copy link
Contributor

Tab and Shift+Tab allow navigating between the commit message and the file lists.

@TomGit27
Copy link

TomGit27 commented Feb 4, 2021

It is hard to tell, where the focus actually is. Also it is possible that you get stuck in the file diff view. You need to press Ctrl+1 to exit. It is predictable and reliable having dedicated shortcuts.

@danspunkmeyer
Copy link

danspunkmeyer commented Feb 19, 2021

The whole keyboard experience in changes doesn't work well. An additional issue is TAB in Unstaged first goes to Staged, fine, but the actual selection bar stays in Unstaged, so if you hit Enter you end up Staging another file. Same scenario if you SHIFT-TAB from Staged and hit Enter, you unstage a file.

There is also considerable lag in both directions.

If the switches were fast and the focus was clearly indicated, TAB - SHIFT+TAB would be fine. As it is, I agree we need dedicated shortcuts. One for Amend would be good too.

@danieldownes
Copy link

I also don't want to use the mouse at all while using fork, and its impossible to do that currently....

@rhys-vdw
Copy link

rhys-vdw commented May 6, 2022

Ctrl+1 when you are in the changes view (or double Ctrl+1 if you are not). This is a hidden one :).

This appears to have been removed in 1.72.3.0

@dday4thedeceiver
Copy link

Still works for me, although I need to admit I ran into a situation where it wouldn't work. Don't know how to repro, unfortunately.

On the larger issue of usability via keyboard - even though I'm now a licensed user, I still have LazyGit/Ungit in the back of my mind because there has been no improvements in this area.

@danieldownes
Copy link

Not working for me, on 1.75.0.0
Can we just have a dedicated shortcut please? Rather than the old double Ctrl+1 method.
The workflow @opus131 outlined is basically what a typical dev will do many times a day.

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

7 participants