diff --git a/Terminal.Gui/Views/Button.cs b/Terminal.Gui/Views/Button.cs index ca204fa13..69cd4c648 100644 --- a/Terminal.Gui/Views/Button.cs +++ b/Terminal.Gui/Views/Button.cs @@ -159,7 +159,7 @@ namespace Terminal.Gui { set { if (hotKey != value) { var v = value == Key.Unknown ? Key.Null : value; - if (ContainsKeyBinding (Key.Space | hotKey)) { + if (hotKey != Key.Null && ContainsKeyBinding (Key.Space | hotKey)) { if (v == Key.Null) { ClearKeybinding (Key.Space | hotKey); } else { diff --git a/Terminal.Gui/Views/TextView.cs b/Terminal.Gui/Views/TextView.cs index 959ab4def..cde610256 100644 --- a/Terminal.Gui/Views/TextView.cs +++ b/Terminal.Gui/Views/TextView.cs @@ -2934,8 +2934,8 @@ namespace Terminal.Gui { { ResetColumnTrack (); - if (!AllowsTab) { - return false; + if (!AllowsTab || isReadOnly) { + return ProcessMovePreviousView (); } if (currentColumn > 0) { var currentLine = GetCurrentLine (); @@ -2958,8 +2958,8 @@ namespace Terminal.Gui { { ResetColumnTrack (); - if (!AllowsTab) { - return false; + if (!AllowsTab || isReadOnly) { + return ProcessMoveNextView (); } InsertText (new KeyEvent ((Key)'\t', null)); DoNeededAction (); @@ -2977,11 +2977,9 @@ namespace Terminal.Gui { { ResetColumnTrack (); - if (!AllowsReturn) { + if (!AllowsReturn || isReadOnly) { return false; } - if (isReadOnly) - return true; var currentLine = GetCurrentLine ();