refactor: remove unused sorting key bindings from various views
@derailed I have resolved the merge conflicts
@uozalp Thank you for this cleanup! I think it looks good but for views that are k9s specific or non k8s resources we should keep the key sorts as these would not change and allow for quick sort without requiring users to column scroll
Would this make sense?
@derailed Shift+S is now used for "Sort Selected Column", but several views also use Shift+S for sorting specific columns (Status, Severity).
This creates conflicts in:
Helm History, Helm Chart, Workload views (Shift+S for Status)
Image Scan view (Shift+S for Severity)
I see three options to resolve this:
- Assign new key bindings for Status/Severity sorts to avoid the
Shift+Sconflict - Keep most sorts, remove only the conflicting ones (Status/Severity)
- Remove all sorting shortcuts from k9s-specific views and rely solely on the column cycle feature
Personally, I lean towards option 3 because:
- These views are typically not the most frequently used
- The column cycle feature (
Shift+S) provides a universal, discoverable way to sort any column
I only use port forwards, and it often has 0-2 entries, honestly don't need to sort such small tables.
I'm happy to implement whichever approach you prefer for the project. What do you think?
Alias
| Key Binding | Sorts By |
|---|---|
Shift+R |
Resource |
Shift+C |
Command |
Shift+A |
API-Group |
Port Forward
| Key Binding | Sorts By |
|---|---|
Shift+P |
Ports |
Shift+U |
URL |
Reference
| Key Binding | Sorts By |
|---|---|
Shift+V |
GVR |
Image Scan/Vulnerability
| Key Binding | Sorts By |
|---|---|
Shift+L |
Library |
Shift+S |
Severity |
Shift+F |
Fixed-in |
Shift+V |
Vulnerability |
Helm History
| Key Binding | Sorts By |
|---|---|
Shift+N |
Revision |
Shift+S |
Status |
Shift+A |
Age |
Helm Char
| Key Binding | Sorts By |
|---|---|
Shift+S |
Status |
Workload
| Key Binding | Sorts By |
|---|---|
Shift+K |
Kind |
Shift+S |
Status |
Shift+R |
Ready |
Shift+A |
Age |
Vulnerability Extender
| Key Binding | Sorts By |
|---|---|
Shift+V |
Vulnerabilities |
@umut Good point! I do think S for sorting might not be the best choice given a lot of k8s/crd resources do expose Status which is a natural choice. Perhaps we should shift our wording from sort to order and expose O for column sorting vs S??
Of all the k9s views, I think alias, workload and helm would benefit from direct ordering shortcuts. And we can add status along with name, namespace and age as default shortcuts...
What do you think?
@derailed I added shortcut bindings for the non-k8s views, changed the column-sort selection to SHIFT+O, and added SHIFT+S (sort by status) globally.
Apologies if I messed anything up. It’s easy to lose track when looking at all those shortcut bindings.
@derailed Fernand, are we missing anything, or is there anything else that needs to be cleaned up?