k9s
k9s copied to clipboard
Alter default key-bindings

Thanks for this wonderfully useful tool!
Is your feature request related to a problem? Please describe.
Some of the essential key-bindings (such as Contol-d
to delete a job/pod) conflict with those used in my terminal/TMUX environment, meaning I have to always perform those in another terminal using e.g. kubectl delete pods ...
.
Describe the solution you'd like A way to change the default key-bindings. Looking in the documentation and skimming the source code, I haven't seen a place to do this myself. I am not talking about the hotkeys option; as far as I can tell, they are a separate feature that also shouldn't contain any of the basic key-bindings.
Describe alternatives you've considered Another YAML file where all keybindings are stored and can be overridden. I am not sure how they are currently implemented, and am not fussy about how a solution may work.
Additional context
I have the same issue and I have to browse the code to override the default command: https://github.com/derailed/k9s/search?q=NewKeyAction&unscoped_q=NewKeyAction
what could be great is to generated a default hotkeys.yml so we can easily override and add custom commands
yes and everytime by default I press q
I'm dying to put q instead of Esc
i cant even use the tool because i use tmux ctrl-a as leader..
It would be great, for example to be able to use the insert key instead of space key to select items (as in mc
).
It is possible to define custom key bindings in hotkey.yml
. Eg:
hotKey:
q:
shortCut: q
description: exit
command: quit
Delete:
shortCut: Delete
description: Delete resource
command: delete
The first one works like a charm, but I get an error Ruroh? 'delete' command not found
with the other.
It's also not possible to overwrite existing key bindings that way.
@derailed are there any plans on implementing this?
I found a partial workaround for people that have conflicting bindings with other applicaitons like tmux
or that simply would like to use CTRL+Z to minimize K9s. Just edit a defintion with your editor, and then the k9s hotkeys are inactive. When you're done simply exit the editor without saving. It's not the best workaround, I admit.
Has anyone been successful in binding a different key to back
? I have <esc>
already mapped in my terminal, so I'd rather have something like q
be back.
I have a hotkeys.yml like:
hotKey:
q:
shortCut: q
description: Go back
command: Back
but I get a "Ruroh?" as well for this, presumably because Back
is not a valid command.