Skip to content

Quit shortcut activates even in commit message #770

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

Closed
dbr opened this issue Jun 5, 2021 · 3 comments
Closed

Quit shortcut activates even in commit message #770

dbr opened this issue Jun 5, 2021 · 3 comments

Comments

@dbr
Copy link

dbr commented Jun 5, 2021

Describe the bug
If in key_config.ron I configure q (no modifiers) to be quit, it is impossible to type q in a input widget like the commit message

This works nicely, except, when typing in something like the commit window, I can't enter q without the application exiting

To Reproduce
Steps to reproduce the behavior:

  1. Configure key_config.ron:
    exit: (
        code: Char('q'),
        modifiers: (
            bits: 0,
        ),
    ),
  1. Try to write q in a commit message

Expected behavior
q should only quit when no input widget is active

Screenshots
N/a

Context (please complete the following information):

  • OS/Distro + Version: Consistent on macOS/iTerm, Linux + xfce-terminal
  • GitUI Version: 0.16
  • Rust version: 1.51

Additional context
N/a

@dbr
Copy link
Author

dbr commented Jun 5, 2021

Actually this is less simple than I first thought:

  • It's fairly reasonable for, say, ctrl+c to quit even when an input is active.
  • It is fairly unreasonable for q to quit while trying to type "Require" in an input

..so maybe "shortcuts are ignored if no modifiers are specified"

However then Shift+q becomes a problem (unless this is handled by the terminal as just Q with no modifier, in which case this is is not an issue)

@extrawurst
Copy link
Collaborator

let me know if #771 will solve your issue

@dbr
Copy link
Author

dbr commented Jun 5, 2021

Yep that sounds good to me! Thanks!

@dbr dbr closed this as completed Jun 5, 2021
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

2 participants