Skip to content
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

Unbind built-in keybinds #632

Closed
ok-nick opened this issue Nov 5, 2022 · 5 comments · Fixed by #883
Closed

Unbind built-in keybinds #632

ok-nick opened this issue Nov 5, 2022 · 5 comments · Fixed by #883
Labels
bug Something isn't working

Comments

@ok-nick
Copy link

ok-nick commented Nov 5, 2022

I find some of the built-in keybinds counterintuitive, like <C-w>, for example. I expect it to delete the previous word, but by default it closes panels and the program. There are a few other default keybinds that I don't like and there should probably be an option to disable them.

@ok-nick ok-nick added the bug Something isn't working label Nov 5, 2022
@ghost
Copy link

ghost commented May 18, 2024

Agreed. I'm quite surprised that there seems to be no way to do this. Since you can define your own key bindings, it seems fairly natural that you might want to unbind the defaults. In my case, I wanted to unbind input_go_left/right so I can disambiguate the arrow keys, after mapping those to ctrl-b/-f. As for syntax, perhaps a field in a verbs list entry like force_unique_key or unbind_others? That way there wouldn't be any weirdness about resolution order. Perhaps additionally, maybe one could have a :unbound or :noop internal for true unbinding.

@Canop
Copy link
Owner

Canop commented May 18, 2024

I forgot this issue, which is why it didn't progress.

I'll do something, probably a kind of no-op verb as you suggest.

The cleanest design would probably be to separate bindings from verb definition but this implies a lot of breaking changes.

@ghost
Copy link

ghost commented May 20, 2024

No worries! Yeah, the current design of mixing keybindings and verb definitions is a little weird and might get a little weirder if unbinding is added as-is, though on the other hand it wasn't that confusing either, just by reading the docs (while learning broot a few days ago) I kind of groked how to do it without too much difficulty. Either way, it's your call, I'm not going to die if I have to wait a few months for unbinding. I'll be happy about it whenever it arrives.

Cheers, and thanks for your efforts!

Canop added a commit that referenced this issue May 28, 2024
To remove a binding (without binding it to another verb), define a verb
without any execution, for example

    {
        key: alt-i
    }

Fix #632
@Canop
Copy link
Owner

Canop commented May 28, 2024

@SamuelSwartzberg I did it. The code and logic is ugly, but it makes it possible to unbind a key.

#883

Canop added a commit that referenced this issue May 31, 2024
To remove a binding (without binding it to another verb), define a verb
without any execution, for example

    {
        key: alt-i
    }

Fix #632
@ghost
Copy link

ghost commented May 31, 2024

Thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants