chipsenkbeil / choose

Fuzzy matcher for OS X that uses both std{in,out} and a native GUI
Other
422 stars 21 forks source link

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

Open benfowler opened 2 years ago

benfowler commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Thanks! In the end, decided it was easier to re-train my fingers to use Ctrl-N and Ctrl-P rather than write and test the change. Thanks for taking the time to reply.

On Wed, 23 Mar 2022 at 16:53, Chip Senkbeil @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/chipsenkbeil/choose/issues/30#issuecomment-1076568429, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMP7LIZWYJXCWNIPMSSKSLVBNEB3ANCNFSM5RFY5TPQ . You are receiving this because you authored the thread.Message ID: @.***>

naba-nyan commented 2 years ago

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

chipsenkbeil commented 2 years ago

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 commented 4 months ago

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 commented 4 months ago

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