Skip to content

Remapped 'confirm' hotkey doesn't go well with the search prompt #2767

@vlad-psh

Description

@vlad-psh

Describe the bug

I thought remapping confirm action to the y key would be very nice, but it seems like search prompt is also using this hotkey rather than separate configuration 🥲

keybinding:
  universal:
    confirm: 'y' # default: '<enter>'

{
Key: opts.GetKey(opts.Config.Universal.Confirm),
Modifier: gocui.ModNone,
Handler: self.confirm,
},

I wonder will it be better to just use fixed <enter> hotkey for search prompts? I guess it makes more sense to be fixed, so even if we remap confirm to any non-alphanumeric hotkey (eg <c-j>), our search prompt will not insert newlines on <enter>, producing a little bit confusing result.

What do you guys think?

PS: Oh, seems like this behavior is also can be seen in all the modal windows (like name prompt when creating new branch, etc). So basically it's a bad idea to remap this 😔 If only there was an confirm-alt remap option like for some other actions...

Version info:

lazygit 0.38.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions