New Keyboard Shortcuts
We're looking for input on some more keyboard shortcuts. We want to align with other similar apps and implement keyboard shortcuts that will be familiar to users. We're currently considering adding the following:
- [ ]
ctrl + ato select all files in filelist in commit mode - [ ]
spaceto toggle select/unselect on focused file - [ ]
escto close an opened file diff preview - [ ]
ctrl + ?to open a keyboard shortcut overview menu
Also potentially ctrl + z/y to travel back and forth in the oplog aka undo stack.
Please add any other ideas below :grin:
Just wanted to report that using up/down keys to navigate between files doesn't work - not sure if it's planned to not work or it's a bug, but that's the behavior in other Git UI tools :)
Thanks for chiming in! Yeah those sound sensible as well 👌
Just wanted to report that using the up/down keys to navigate between files doesn't work. Not sure if it's intentional or a bug, but that's how it works in other Git UI tools. :)
@freak4pc This is indeed a bug. The functionality should be working, so I'm wondering why it isn't on your end. If possible, could you please create a separate issue for this? You can do so using this link.
https://github.com/user-attachments/assets/cefe35bc-d6ca-43d6-8ba1-cf8233a08217
Just wanted to report that using the up/down keys to navigate between files doesn't work. Not sure if it's intentional or a bug, but that's how it works in other Git UI tools. :)
@freak4pc This is indeed a bug. The functionality should be working, so I'm wondering why it isn't on your end. If possible, could you please create a separate issue for this? You can do so using this link.
Screen.Recording.2024-08-26.at.15.22.52.mov
Thanks, I actually meant when being focused on a specific commit, not on the staged workspace changes
Thanks, I actually meant when being focused on a specific commit, not on the staged workspace changes
@freak4pc, thank you for clarifying this. Yes, it doesn’t work at the moment. It's something we need to fix.
I am currently thinking if hitting esc while in the settings (both, project and app settings) should bring you back to the previous screen from where you opened the settings (similar to the small arrow on the upper left hand side).
I am currently thinking if hitting
escwhile in the settings (both, project and app settings) should bring you back to the previous screen from where you opened the settings (similar to the small arrow on the upper left hand side).
I find myself hitting esc to do just that out of muscle memory sometimes :sweat_smile: Down with this as well!
Note for ourselves for the future: Navigating up/down with the keyboard arrows in the Filelist sometimes behaves very strangely. For example, skipping items, stopping at "incorrect" items, etc.
Note for ourselves for the future: Navigating
up/downwith the keyboard arrows in the Filelist sometimes behaves very strangely. For example, skipping items, stopping at "incorrect" items, etc.
Can you please also attach a video capture or describe how to reproduce this.
There's not much to record, for example in this scenario:
If I select the top file, controller.js, I can only navigate down to index.js with the keyboard down arrow. Then it gets stuck.
Similarly, if I click on the bottom item, test.txt, and press up on the keyboard arrow, it jumps to index.js (skipping package.json) and then gets stuck on index.js.
I notice myself often hit f in GitButler as I am often using vim plugin for my browser, and it comes as a surprise that all actionable elements are not highlighted and I have to click with me mouse.
I know chances for that is low, but I'd love to see something like that for GitButler.
Instead of preset hardcoded hot-keys - just give me all hotkeys, for every single actionable element. Or, at least, expose all of them with cmd + K in Linear style, where cmd + K menu is context-aware of current window state, as opposed to slack when it's always global context.
Posting my ideas from the Discord here too. Have you thought of throwing a whole list together somewhere so that it could be voted on somehow?
The "focus navigations" I'd most like to see to bring my workflow to the keyboard:
- Focus changed files
- Focus a given changed file
- Focus a hunk in a file
- Focus Tab/Stack (when that's implemented)
- Focus branch in lane
- Focus commit on branch
And the related actions/commands I'd like to perform in a given context (Maybe this is a separate issue, but I thought it relevant while discussing keyboard-izing™️ GB):
- Move selected file(s) to x commit
- Start a commit from changed files
- Maybe start a commit with selected files
- Uncommit a selected commit on a branch
- Move selected hunk to a commit
A few notes:
-
CMD + \(toggle sidebar) is already a default shortcut for both 1Password as well as Launchbar. 😓 Would it be possible to change this? - There is no shortcut (or is not shown) to select the "project switcher". I would argue that
CMD + Tis a common one, but in GB is already assigned to a very useful (sarcasm :D) theme switching. 😅 Sarcasm aside, ideally in this context there should be those shortcuts:- One to open the project switcher
- One that switches to the "previous project", a typical usage of this could be "making a fix on a dependent project just to switch back to the main one after"
Came here looking for a project switcher shortcut, naturally went for CMD + P, another nice quality of life one would be to pull upstream commits
Do you plan on spending some time on keyboard shortcuts in the near future? It's a great app but this really holds it back—right now, at least with the new UI, it doesn't feel like keyboard shortcuts have been given any attention, other than they greyed out keyboard shortcuts icon.
@sminnee Thanks for the feedback! We actually have a large keyboard shortcut map planned, but as you mentioned, the new UI is still in development, so we held off on the implementation. I’ll try to push this up and see what we can already start adding. If there are specific shortcuts you’d like to see, feel free to share them!
The main area that i would like to see keyboard shortcuts is when staging files for a commit.
The critical:
- Being able to use up/down arrows to cycle between files (this may be working but maybe it's recent or buggy?)
- Space or enter to toggle wether the file is included
The nice to have:
- Being able to tab to the chunks of a single file and then use a similar interaction to stage/unstage chunks
- It would also be great to go one level further than then do the same with single lines, but that would probably be the least essential.
Allowing up/down arrow navigation of other lists would be great. Right now when I select one and press up/down i just see a blue horizontal line a bit like it's trying to select something
- The individual commits in a branch
- The individual files in a commit
Being able to override the shortcuts with my own bindings is pretty low priority. Just knowing what the defaults are for me to learn would be okay.
TL;DR: "Move selection up", "'Move selection down", and "Toggle selection" on your keyboard shortcut map (rows 94, 95, 107)
I would love the ability to commit and push at the same time from here:
Maybe option+command+return?