From c742e2e848046ec73c991158a4319c67bf021534 Mon Sep 17 00:00:00 2001 From: derailed Date: Tue, 13 Aug 2019 23:46:42 -0600 Subject: [PATCH] changed menu shortcut --- change_logs/release_0.8.2.md | 25 +++++++++++++++ internal/ui/menu.go | 60 ------------------------------------ internal/views/container.go | 4 +-- internal/views/forward.go | 2 +- internal/views/help.go | 4 +-- internal/views/no.go | 4 +-- internal/views/pod.go | 6 ++-- internal/views/svc.go | 2 +- 8 files changed, 36 insertions(+), 71 deletions(-) create mode 100644 change_logs/release_0.8.2.md diff --git a/change_logs/release_0.8.2.md b/change_logs/release_0.8.2.md new file mode 100644 index 00000000..f26249ff --- /dev/null +++ b/change_logs/release_0.8.2.md @@ -0,0 +1,25 @@ + + +# Release v0.8.2 + +## Notes + +Thank you to all that contributed with flushing out issues and enhancements for K9s! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes! If you've filed an issue please help me verify and close. Your support, kindness and awesome suggestions to make K9s better is as ever very much noticed and appreciated! + +Also if you dig this tool, please make some noise on social! [@kitesurfer](https://twitter.com/kitesurfer) + +--- + +## Change Logs + +Maintenance release + +--- + +## Resolved Bugs/Features + ++ [Issue #285](https://github.com/derailed/k9s/issues/285) + +--- + + © 2019 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/internal/ui/menu.go b/internal/ui/menu.go index a738cde8..09c14bcd 100644 --- a/internal/ui/menu.go +++ b/internal/ui/menu.go @@ -161,36 +161,6 @@ const ( Key9 ) -// Defines AltKeys -const ( - KeyAltA tcell.Key = 4 * (iota + 97) - KeyAltB - KeyAltC - KeyAltD - KeyAltE - KeyAltF - KeyAltG - KeyAltH - KeyAltI - KeyAltJ - KeyAltK - KeyAltL - KeyAltM - KeyAltN - KeyAltO - KeyAltP - KeyAltQ - KeyAltR - KeyAltS - KeyAltT - KeyAltU - KeyAltV - KeyAltW - KeyAltX - KeyAltY - KeyAltZ -) - // Defines char keystrokes const ( KeyA tcell.Key = iota + 97 @@ -275,7 +245,6 @@ func initKeys() { initNumbKeys() initStdKeys() initShiftKeys() - initAltKeys() } func initNumbKeys() { @@ -348,32 +317,3 @@ func initShiftKeys() { tcell.KeyNames[tcell.Key(KeyShiftY)] = "Shift-Y" tcell.KeyNames[tcell.Key(KeyShiftZ)] = "Shift-Z" } - -func initAltKeys() { - tcell.KeyNames[tcell.Key(KeyAltA)] = "Alt-A" - tcell.KeyNames[tcell.Key(KeyAltB)] = "Alt-B" - tcell.KeyNames[tcell.Key(KeyAltC)] = "Alt-C" - tcell.KeyNames[tcell.Key(KeyAltD)] = "Alt-D" - tcell.KeyNames[tcell.Key(KeyAltE)] = "Alt-E" - tcell.KeyNames[tcell.Key(KeyAltF)] = "Alt-F" - tcell.KeyNames[tcell.Key(KeyAltG)] = "Alt-G" - tcell.KeyNames[tcell.Key(KeyAltH)] = "Alt-H" - tcell.KeyNames[tcell.Key(KeyAltI)] = "Alt-I" - tcell.KeyNames[tcell.Key(KeyAltJ)] = "Alt-J" - tcell.KeyNames[tcell.Key(KeyAltK)] = "Alt-K" - tcell.KeyNames[tcell.Key(KeyAltL)] = "Alt-L" - tcell.KeyNames[tcell.Key(KeyAltM)] = "Alt-M" - tcell.KeyNames[tcell.Key(KeyAltN)] = "Alt-N" - tcell.KeyNames[tcell.Key(KeyAltO)] = "Alt-O" - tcell.KeyNames[tcell.Key(KeyAltP)] = "Alt-P" - tcell.KeyNames[tcell.Key(KeyAltQ)] = "Alt-Q" - tcell.KeyNames[tcell.Key(KeyAltR)] = "Alt-R" - tcell.KeyNames[tcell.Key(KeyAltS)] = "Alt-S" - tcell.KeyNames[tcell.Key(KeyAltT)] = "Alt-T" - tcell.KeyNames[tcell.Key(KeyAltU)] = "Alt-U" - tcell.KeyNames[tcell.Key(KeyAltV)] = "Alt-V" - tcell.KeyNames[tcell.Key(KeyAltW)] = "Alt-W" - tcell.KeyNames[tcell.Key(KeyAltX)] = "Alt-X" - tcell.KeyNames[tcell.Key(KeyAltY)] = "Alt-Y" - tcell.KeyNames[tcell.Key(KeyAltZ)] = "Alt-Z" -} diff --git a/internal/views/container.go b/internal/views/container.go index 691652bf..4c8e0d73 100644 --- a/internal/views/container.go +++ b/internal/views/container.go @@ -50,8 +50,8 @@ func (v *containerView) extraActions(aa ui.KeyActions) { aa[ui.KeyP] = ui.NewKeyAction("Previous", v.backCmd, false) aa[ui.KeyShiftC] = ui.NewKeyAction("Sort CPU", v.sortColCmd(6, false), true) aa[ui.KeyShiftM] = ui.NewKeyAction("Sort MEM", v.sortColCmd(7, false), true) - aa[ui.KeyAltC] = ui.NewKeyAction("Sort CPU%", v.sortColCmd(8, false), true) - aa[ui.KeyAltM] = ui.NewKeyAction("Sort MEM%", v.sortColCmd(9, false), true) + aa[ui.KeyShiftX] = ui.NewKeyAction("Sort CPU%", v.sortColCmd(8, false), true) + aa[ui.KeyShiftZ] = ui.NewKeyAction("Sort MEM%", v.sortColCmd(9, false), true) } func (v *containerView) k9sEnv() K9sEnv { diff --git a/internal/views/forward.go b/internal/views/forward.go index 35e5a6da..cbd32065 100644 --- a/internal/views/forward.go +++ b/internal/views/forward.go @@ -99,7 +99,7 @@ func (v *forwardView) registerActions() { tv.SetActions(ui.KeyActions{ tcell.KeyEnter: ui.NewKeyAction("Goto", v.gotoBenchCmd, true), tcell.KeyCtrlB: ui.NewKeyAction("Bench", v.benchCmd, true), - ui.KeyAltB: ui.NewKeyAction("Bench Stop", v.benchStopCmd, true), + tcell.KeyCtrlK: ui.NewKeyAction("Bench Stop", v.benchStopCmd, true), tcell.KeyCtrlD: ui.NewKeyAction("Delete", v.deleteCmd, true), ui.KeySlash: ui.NewKeyAction("Filter", tv.activateCmd, false), ui.KeyP: ui.NewKeyAction("Previous", v.app.prevCmd, false), diff --git a/internal/views/help.go b/internal/views/help.go index ef884a52..228980c0 100644 --- a/internal/views/help.go +++ b/internal/views/help.go @@ -100,8 +100,8 @@ func (v *helpView) showNav() ui.Hints { func (v *helpView) showGeneral() ui.Hints { return ui.Hints{ - {":", "Command mode"}, - {"/", "Filter mode"}, + {":cmd", "Command mode"}, + {"/term", "Filter mode"}, {"esc", "Clear filter"}, {"tab", "Next term match"}, {"backtab", "Previous term match"}, diff --git a/internal/views/no.go b/internal/views/no.go index 043b53db..00739b5e 100644 --- a/internal/views/no.go +++ b/internal/views/no.go @@ -21,8 +21,8 @@ func newNodeView(t string, app *appView, list resource.List) resourceViewer { func (v *nodeView) extraActions(aa ui.KeyActions) { aa[ui.KeyShiftC] = ui.NewKeyAction("Sort CPU", v.sortColCmd(7, false), true) aa[ui.KeyShiftM] = ui.NewKeyAction("Sort MEM", v.sortColCmd(8, false), true) - aa[ui.KeyAltC] = ui.NewKeyAction("Sort CPU%", v.sortColCmd(9, false), true) - aa[ui.KeyAltM] = ui.NewKeyAction("Sort MEM%", v.sortColCmd(10, false), true) + aa[ui.KeyShiftX] = ui.NewKeyAction("Sort CPU%", v.sortColCmd(9, false), true) + aa[ui.KeyShiftZ] = ui.NewKeyAction("Sort MEM%", v.sortColCmd(10, false), true) } func (v *nodeView) sortColCmd(col int, asc bool) func(evt *tcell.EventKey) *tcell.EventKey { diff --git a/internal/views/pod.go b/internal/views/pod.go index faa95011..6d7c51ad 100644 --- a/internal/views/pod.go +++ b/internal/views/pod.go @@ -50,7 +50,7 @@ func newPodView(t string, app *appView, list resource.List) resourceViewer { } func (v *podView) extraActions(aa ui.KeyActions) { - aa[ui.KeyAltK] = ui.NewKeyAction("Kill", v.killCmd, true) + aa[tcell.KeyCtrlK] = ui.NewKeyAction("Kill", v.killCmd, true) aa[ui.KeyS] = ui.NewKeyAction("Shell", v.shellCmd, true) aa[ui.KeyL] = ui.NewKeyAction("Logs", v.logsCmd, true) @@ -61,8 +61,8 @@ func (v *podView) extraActions(aa ui.KeyActions) { aa[ui.KeyShiftT] = ui.NewKeyAction("Sort Restart", v.sortColCmd(3, false), true) aa[ui.KeyShiftC] = ui.NewKeyAction("Sort CPU", v.sortColCmd(4, false), true) aa[ui.KeyShiftM] = ui.NewKeyAction("Sort MEM", v.sortColCmd(5, false), true) - aa[ui.KeyAltC] = ui.NewKeyAction("Sort CPU%", v.sortColCmd(6, false), true) - aa[ui.KeyAltM] = ui.NewKeyAction("Sort MEM%", v.sortColCmd(7, false), true) + aa[ui.KeyShiftX] = ui.NewKeyAction("Sort CPU%", v.sortColCmd(6, false), true) + aa[ui.KeyShiftZ] = ui.NewKeyAction("Sort MEM%", v.sortColCmd(7, false), true) aa[ui.KeyShiftD] = ui.NewKeyAction("Sort IP", v.sortColCmd(8, true), true) aa[ui.KeyShiftO] = ui.NewKeyAction("Sort Node", v.sortColCmd(9, true), true) } diff --git a/internal/views/svc.go b/internal/views/svc.go index 86a53fd2..1fb0b22f 100644 --- a/internal/views/svc.go +++ b/internal/views/svc.go @@ -46,7 +46,7 @@ func (v *svcView) getSelection() string { func (v *svcView) extraActions(aa ui.KeyActions) { aa[ui.KeyL] = ui.NewKeyAction("Logs", v.logsCmd, true) aa[tcell.KeyCtrlB] = ui.NewKeyAction("Bench", v.benchCmd, true) - aa[ui.KeyAltB] = ui.NewKeyAction("Bench Stop", v.benchStopCmd, true) + aa[tcell.KeyCtrlK] = ui.NewKeyAction("Bench Stop", v.benchStopCmd, true) aa[ui.KeyShiftT] = ui.NewKeyAction("Sort Type", v.sortColCmd(1, false), true) }