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

[FR] ability to remap keys for navigation to resemble fzf #30

Open
benfowler opened this issue Mar 20, 2022 · 6 comments
Open

[FR] ability to remap keys for navigation to resemble fzf #30

benfowler opened this issue Mar 20, 2022 · 6 comments

Comments

@benfowler
Copy link

I would like to -- short of having to hack the code and compile from source -- be able to map the UP and DOWN bindings to ^K and ^J respectively. This is for us who have fzf(1) keybindings burnt into our fingers.

(I could have a go at adding this functionality myself, especially if we can think of a clean way to exposing this functionality and we're short of time.)

@chipsenkbeil
Copy link
Owner

I would like to -- short of having to hack the code and compile from source -- be able to map the UP and DOWN bindings to ^K and ^J respectively. This is for us who have fzf(1) keybindings burnt into our fingers.

Would you want this to be available at the same time as the current keybindings? Something users can switch between? My thought is to make it such that the user can specify the key bindings to use for navigation in a config file they can place somewhere to be read by default, that way we don't start adding new keybindings for every distinct layout someone would like.

(I could have a go at adding this functionality myself, especially if we can think of a clean way to exposing this functionality and we're short of time.)

My time to add new features and tweak things is limited. There's no rush here, but if you're motivated and want to take a crack at an implementation, I'd be happy to review the PR. As for how to approach this, the config file is my first thought. But open to suggestions.

@benfowler
Copy link
Author

benfowler commented Jun 11, 2022 via email

@naba-nyan
Copy link

Hi, I also want to remap UP and DOWN bindings to [Shift - TAB] and [TAB].
Does choose contain any configuration files?

@chipsenkbeil
Copy link
Owner

Hi, I also want to remap UP and DOWN bindings to [Shift - TAB] and [TAB]. Does choose contain any configuration files?

It does not, but PRs are welcome if it's something you'd like to add 😄

@danischn
Copy link

Where in the source code is the keymaps defined? Im not able to find it. I would like to map ctrl+j to move down, and ctrl+k to move up. Thanks!

@chipsenkbeil
Copy link
Owner

chipsenkbeil commented Jul 11, 2024

Where in the source code is the keymaps defined? Im not able to find it. I would like to map ctrl+j to move down, and ctrl+k to move up. Thanks!

https://github.com/chipsenkbeil/choose/blob/master/SDAppDelegate.m#L366-L381 for custom keybindings

https://github.com/chipsenkbeil/choose/blob/master/SDAppDelegate.m#L535-L554 shows the mapping of moving up and down

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

4 participants