-
When configuring a I have a standard full US keyboard and I don't think I have anything else binding to those keys. I'm using bash terminal on Linux Mint 19.3. Am I missing something or is there a bug? static void Main(string[] args)
{
//Application.UseSystemConsole = true;
Application.Init();
var statusBar = new StatusBar (new StatusItem [] {
new StatusItem(Key.CtrlMask | Key.A, "A", () => throw new Exception("A pressed")),
new StatusItem(Key.CtrlMask | Key.B, "B", () => throw new Exception("B pressed")),
new StatusItem(Key.CtrlMask | Key.C, "C", () => throw new Exception("C pressed")),
new StatusItem(Key.CtrlMask | Key.D, "D", () => throw new Exception("D pressed")),
new StatusItem(Key.CtrlMask | Key.E, "E", () => throw new Exception("E pressed")),
new StatusItem(Key.CtrlMask | Key.F, "F", () => throw new Exception("F pressed")),
new StatusItem(Key.CtrlMask | Key.G, "G", () => throw new Exception("G pressed")),
new StatusItem(Key.CtrlMask | Key.H, "H", () => throw new Exception("H pressed")), // not working in SystemConsole, worked with ncurses
new StatusItem(Key.CtrlMask | Key.I, "I", () => throw new Exception("I pressed")), // not working in both
new StatusItem(Key.CtrlMask | Key.J, "J", () => throw new Exception("J pressed")), // not working in both
new StatusItem(Key.CtrlMask | Key.K, "K", () => throw new Exception("K pressed")),
new StatusItem(Key.CtrlMask | Key.L, "L", () => throw new Exception("L pressed")),
new StatusItem(Key.CtrlMask | Key.M, "M", () => throw new Exception("M pressed")), // not working in both
new StatusItem(Key.CtrlMask | Key.N, "N", () => throw new Exception("N pressed")),
new StatusItem(Key.CtrlMask | Key.O, "O", () => throw new Exception("O pressed")),
new StatusItem(Key.CtrlMask | Key.P, "P", () => throw new Exception("P pressed")),
new StatusItem(Key.CtrlMask | Key.Q, "Q", () => { Application.RequestStop(); }),
new StatusItem(Key.CtrlMask | Key.R, "R", () => throw new Exception("R pressed")),
new StatusItem(Key.CtrlMask | Key.S, "S", () => throw new Exception("S pressed")),
new StatusItem(Key.CtrlMask | Key.T, "T", () => throw new Exception("T pressed")),
new StatusItem(Key.CtrlMask | Key.U, "U", () => throw new Exception("U pressed")),
new StatusItem(Key.CtrlMask | Key.V, "V", () => throw new Exception("V pressed")),
new StatusItem(Key.CtrlMask | Key.W, "W", () => throw new Exception("W pressed")),
new StatusItem(Key.CtrlMask | Key.X, "X", () => throw new Exception("X pressed")),
new StatusItem(Key.CtrlMask | Key.Y, "Y", () => throw new Exception("Y pressed")),
new StatusItem(Key.CtrlMask | Key.Z, "Z", () => throw new Exception("Z pressed")),
});
Application.Top.Add(statusBar);
try
{
try
{
Application.Run();
}
finally
{
Application.Shutdown();
}
}
catch(Exception e)
{
Console.WriteLine(e);
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks for your detailed code sample. Some shortcut combinations are not supported by the terminal. A great summary of why this is is here: https://unix.stackexchange.com/a/213851 Similarly Ctrl+H sends backspace on some terminals: You could try different consoles or just avoid those combinations. Are there any other TUI applications you use (e.g. nano) that have bindings for those key combinations? |
Beta Was this translation helpful? Give feedback.
Thanks for your detailed code sample. Some shortcut combinations are not supported by the terminal. A great summary of why this is is here:
https://unix.stackexchange.com/a/213851
Similarly Ctrl+H sends backspace on some terminals:
https://unix.stackexchange.com/a/327955
You could try different consoles or just avoid those combinations. Are there any other TUI applications you use (e.g. nano) that have bindings for those key combinations?