kubebox
kubebox copied to clipboard
auto-focus logs when pod is selected
auto-focus logs when pod is selected. From my point of view, a very useful feature.
I can see it's useful in some use cases. On the other hand, I can also see use cases where it's not ideal. For example, with pods having more than one containers. One idea could be to focus the log element only when the Shift key or Alt key has also been pressed?
As far as I understand the code blessed does not support key Alt
key. And I also did not get a binding like Shift+Enter
or Ctrl+Enter
working.
It should be possible to test for key.shift
or key.meta
in the listener. If the listener is not called, it's possible the terminal emulator you use already have a key binding for the combination.
It should be possible to test for
key.shift
orkey.meta
in the listener.
Yes, i know.
I've added this code to dashboard.js:
pods_table.key(['S-enter', 'C-enter', 'enter'], (_, key) => {
debug.log("pods_table.key('enter') : '" + JSON.stringify(key) +"'");
});
screen.on('keypress', function(key) {
debug.log("screen.on('keypress') : '" + JSON.stringify(key) +"'");
});
The keypress
-Event always gets fired twice when pressing enter and shows \r
as output, only the Alt
Key is also displayed.
The pods_table.key
only shows the enter
key, neither with shitft nor with ctrl.
I'm pretty sure that there is no keybinding for Shift-Enter
or Control-Enter
in my terminal.
OK, thanks. I'll have a deeper look at it ASAP.