insanum / sncli

Simplenote CLI
MIT License
396 stars 34 forks source link

Several keybindings for one action? #33

Open for-coursera opened 7 years ago

for-coursera commented 7 years ago

Is is possible to have several alternate keybindings for one action? Like, q, <Esc>, <F10> for quit?

samuelallan72 commented 7 years ago

Not currently. It could be possible, but easily become quite messy in the codebase...

What use cases are you thinking of where this would be useful?

for-coursera commented 7 years ago

What use cases are you thinking of where this would be useful?

Just indulging to a person's habits? :) Hotkeys are mostly the muscular memories, so adding more options could save some additional seconds for some of us.

On the other hand, if I'm the first to ask, then it's not that badly needed, I presume.

samuelallan72 commented 7 years ago

Yep this hasn't come up before. I'm trying to think of a use case that could make it worthwhile attempting to implement it. Currently you can remap any of the default keybindings to whatever you want, so if you find one of q or <esc> or <F10> faster for quit, then you're free to rebind it. This has obviously been enough so far.

Of course if you can come up with a neat, efficient method of implementing it, feel free to submit a pull request. :)