sourcegit-scm / sourcegit

Windows/macOS/Linux GUI client for GIT users
MIT License
668 stars 69 forks source link

HotKeys for macOS #103

Closed successgo closed 2 months ago

successgo commented 2 months ago

Hi, thank you for the fantastic software.

macOS is mainly using Command other than Control like Command + T to open new page. Can we keep this convention?

love-linger commented 2 months ago

I'm using hackintosh to compile and distribute this app for macOS and I do NOT have an apple keyboard to test with hotkeys. I can't guarantee that the current changes are consistent with macOS user habits.

Looking forward to your feedback.

successgo commented 2 months ago

Cool, I'll check that later.

successgo commented 2 months ago

Confirmed: CMD+W and CMD+T worked very well. I thought others should be too because I don't use them.

Thank you @love-linger

love-linger commented 2 months ago

The HotKeys from main menu shows all the hotkeys used by this app. image

Could you help me to test these hotkeys?

successgo commented 2 months ago

Tested and all working fine.

But reguarding F5, while reloading done, the focus is updated to the middle of the commit history other that the top and I have to scroll to the top, did that design so?

For text editor searching: On Chrome and Rider, Enter is for next match, and Shift + Enter is for the previous match.

Also for next page: It would be great to use Ctrl + Tab as in windows, and it would be better to add Shift + Ctrl + Tab to go to previous page.

Also for stage / unstage: It would be great to use Enter other than Space.

Nice to have: On macOS, while editing there are some global shortcuts to use, like Ctrl + F to move the cursor to the right of one character and Ctrl + B do the opposite, and Ctrl + P to move the cursor to the previous line and Ctrl + N to the cursor the next line.

love-linger commented 2 months ago
  1. After reloading repository, the selected commit keeps to the last selected one. See PR #104
  2. It's the built-in hotkeys in AvaloniaEdit control.
  3. I'll consider to add these keys.
  4. The TreeView/ListView/DataGrid has these built-in hotkeys.
love-linger commented 2 months ago

I have just confirmed that use Enter for next match and Shift+Enter for previous match is also worked on Windows

successgo commented 2 months ago
  1. Sorry, You are right. This is great to keep the last selected commit.
successgo commented 2 months ago

I have just confirmed that use Enter for next match and Shift+Enter for previous match is also worked on Windows

I just confirmed it's also working fine for macOS.

successgo commented 2 months ago

While digging more on searching:

  1. Search Files on CHANGES tab does not support shortcut, like Ctrl + F on windows and Command + F on macOS.
  2. Search commits and search text, both are using Ctrl + F to invoke, but cancel searching is using different approach, it will be better to keep consistence, ESC to cancel would be good.
love-linger commented 2 months ago

https://github.com/sourcegit-scm/sourcegit/actions/runs/8963157118

successgo commented 2 months ago

Hi @love-linger As for switching pages Ctrl+Tab and Shift+Ctrl+Tab does not work in v8.11.

love-linger commented 2 months ago

Hi @love-linger As for switching pages Ctrl+Tab and Shift+Ctrl+Tab does not work in v8.11.

Which OS do you use? On macOS, the hotkey to switch pages is ⌘+⌥+← and ⌘+⌥+→

successgo commented 2 months ago

It's macOS. I thought you added Ctrl+Tab and Shift+Ctrl+Tab.

EreMaijala commented 2 months ago

@love-linger Ctrl+Tab and Shift+Ctrl+Tab would be nice, but having at least ⌘+⌥+← and ⌘+⌥+→ is nice. :) However, it seems that they clash with other shortcuts and don't work properly if focus is e.g. in the histories graph or "Search Files" field in CHANGES tab.