Skip to content

refactor: push hotkey behavior#2160

Open
heartacker wants to merge 1 commit intosourcegit-scm:developfrom
heartacker:dev/c+up
Open

refactor: push hotkey behavior#2160
heartacker wants to merge 1 commit intosourcegit-scm:developfrom
heartacker:dev/c+up

Conversation

@heartacker
Copy link
Contributor

@heartacker heartacker commented Mar 3, 2026

change Ctrl+Shift+Up to popup push, and just hit enter, you can push directly, easily, safely.

@love-linger
Copy link
Collaborator

We already has a Ctrl+Shift+Up for push directly. And Ctrl+Up is hardcoded in ListBox, DataGrid in AvaloniaUI

@love-linger love-linger self-assigned this Mar 3, 2026
@love-linger love-linger added the not-planned It's not planned in the future label Mar 3, 2026
@heartacker
Copy link
Contributor Author

We already has a Ctrl+Shift+Up for push directly.

Yes, we know but we don't want push directly,

Is it possible to change the action from direct push to a pop-up window? All it requires is for the user to press the Enter key.

And Ctrl+Up is hardcoded in ListBox, DataGrid in AvaloniaUI
😢

@love-linger
Copy link
Collaborator

Yes, we know but we don't want push directly. Is it possible to change the action from direct push to a pop-up window? All it requires is for the user to press the Enter key.

Then this requirement is very strange. If you don't want to push directly, but pop up a panel to operate before pushing, it means that the user needs additional keyboard and mouse operations. Why not just click? Then the panel would directly appear right below the current mouse.

@heartacker
Copy link
Contributor Author

Regarding your question: "If you don't want to push directly, but pop up a panel to operate before pushing... Why not just click?"

The core motivation here is to support a fully keyboard-centric workflow for power users. Opening a panel does not necessarily mean we need to reach for the mouse. Here are the typical "no-mouse" scenarios:

Zero Mouse Usage: After writing a commit message and committing (e.g., via Ctrl+Enter), our hands are already on the keyboard. Reaching for the mouse breaks the flow.

Navigating the Panel via Keyboard: Once the hotkey opens the Push panel, a user can simply use Tab to navigate, Space to toggle options (like Force Push or Push Tags), and hit Enter to execute. The entire process requires 0 mouse clicks.

Safety Confirmation: Direct push (Ctrl+Shift+Up) is fast but sometimes risky. Many users want to trigger the popup via a hotkey just to visually double-check the target remote/branch, and then immediately press Enter to confirm. It acts as a quick safety buffer.

Since Ctrl+Up is hardcoded in Avalonia, I totally understand we can't use it. Would you be open to assigning a different default hotkey (like Alt+Up or something similar), or just adding the command so it can be triggered without the mouse?

push directly = push + enter, It is easy :)

@heartacker heartacker changed the title feat: add push hotkey refactor: push hotkey behavior Mar 3, 2026
@heartacker
Copy link
Contributor Author

I have push an new change

  • change Ctrl+Shift+Up to popup push, and just hit enter, you can push directly, easily, safely.

- Rename the hotkey handler for push operations to align with its function.
- Rename the hotkey-triggered push method and change its behavior to push without forcing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-planned It's not planned in the future

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants