Browse Source

Cleaned up Command enum.

Tig 10 months ago
parent
commit
ba161b3eae

+ 14 - 14
Terminal.Gui/Application/Application.Keyboard.cs

@@ -282,7 +282,7 @@ public static partial class Application // Keyboard handling
 
 
         // Things this view knows how to do
         // Things this view knows how to do
         AddCommand (
         AddCommand (
-                    Command.QuitToplevel, // TODO: IRunnable: Rename to Command.Quit to make more generic.
+                    Command.Quit, // TODO: IRunnable: Rename to Command.Quit to make more generic.
                     static () =>
                     static () =>
                     {
                     {
                         if (ApplicationOverlapped.OverlappedTop is { })
                         if (ApplicationOverlapped.OverlappedTop is { })
@@ -309,15 +309,15 @@ public static partial class Application // Keyboard handling
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.NextView,
+                    Command.NextTabStop,
                     static () => Navigation?.AdvanceFocus (NavigationDirection.Forward, TabBehavior.TabStop));
                     static () => Navigation?.AdvanceFocus (NavigationDirection.Forward, TabBehavior.TabStop));
 
 
         AddCommand (
         AddCommand (
-                    Command.PreviousView,
+                    Command.PreviousTabStop,
                     static () => Navigation?.AdvanceFocus (NavigationDirection.Backward, TabBehavior.TabStop));
                     static () => Navigation?.AdvanceFocus (NavigationDirection.Backward, TabBehavior.TabStop));
 
 
         AddCommand (
         AddCommand (
-                    Command.NextViewOrTop,
+                    Command.NextTabGroup,
                     static () =>
                     static () =>
                     {
                     {
                         // TODO: This OverlapppedTop tomfoolery goes away in addressing #2491
                         // TODO: This OverlapppedTop tomfoolery goes away in addressing #2491
@@ -333,7 +333,7 @@ public static partial class Application // Keyboard handling
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.PreviousViewOrTop,
+                    Command.PreviousTabGroup,
                     static () =>
                     static () =>
                     {
                     {
                         // TODO: This OverlapppedTop tomfoolery goes away in addressing #2491
                         // TODO: This OverlapppedTop tomfoolery goes away in addressing #2491
@@ -386,17 +386,17 @@ public static partial class Application // Keyboard handling
         QuitKey = Key.Esc;
         QuitKey = Key.Esc;
         ArrangeKey = Key.F5.WithCtrl;
         ArrangeKey = Key.F5.WithCtrl;
 
 
-        KeyBindings.Add (QuitKey, KeyBindingScope.Application, Command.QuitToplevel);
+        KeyBindings.Add (QuitKey, KeyBindingScope.Application, Command.Quit);
 
 
-        KeyBindings.Add (Key.CursorRight, KeyBindingScope.Application, Command.NextView);
-        KeyBindings.Add (Key.CursorDown, KeyBindingScope.Application, Command.NextView);
-        KeyBindings.Add (Key.CursorLeft, KeyBindingScope.Application, Command.PreviousView);
-        KeyBindings.Add (Key.CursorUp, KeyBindingScope.Application, Command.PreviousView);
-        KeyBindings.Add (NextTabKey, KeyBindingScope.Application, Command.NextView);
-        KeyBindings.Add (PrevTabKey, KeyBindingScope.Application, Command.PreviousView);
+        KeyBindings.Add (Key.CursorRight, KeyBindingScope.Application, Command.NextTabStop);
+        KeyBindings.Add (Key.CursorDown, KeyBindingScope.Application, Command.NextTabStop);
+        KeyBindings.Add (Key.CursorLeft, KeyBindingScope.Application, Command.PreviousTabStop);
+        KeyBindings.Add (Key.CursorUp, KeyBindingScope.Application, Command.PreviousTabStop);
+        KeyBindings.Add (NextTabKey, KeyBindingScope.Application, Command.NextTabStop);
+        KeyBindings.Add (PrevTabKey, KeyBindingScope.Application, Command.PreviousTabStop);
 
 
-        KeyBindings.Add (NextTabGroupKey, KeyBindingScope.Application, Command.NextViewOrTop);
-        KeyBindings.Add (PrevTabGroupKey, KeyBindingScope.Application, Command.PreviousViewOrTop);
+        KeyBindings.Add (NextTabGroupKey, KeyBindingScope.Application, Command.NextTabGroup);
+        KeyBindings.Add (PrevTabGroupKey, KeyBindingScope.Application, Command.PreviousTabGroup);
 
 
         KeyBindings.Add (ArrangeKey, KeyBindingScope.Application, Command.Edit);
         KeyBindings.Add (ArrangeKey, KeyBindingScope.Application, Command.Edit);
 
 

+ 161 - 144
Terminal.Gui/Input/Command.cs

@@ -6,157 +6,146 @@ namespace Terminal.Gui;
 /// <summary>Actions which can be performed by the application or bound to keys in a <see cref="View"/> control.</summary>
 /// <summary>Actions which can be performed by the application or bound to keys in a <see cref="View"/> control.</summary>
 public enum Command
 public enum Command
 {
 {
+    #region Default View Commands
+
     /// <summary>Invoked when the HotKey for the View has been pressed.</summary>
     /// <summary>Invoked when the HotKey for the View has been pressed.</summary>
     HotKey,
     HotKey,
 
 
-    /// <summary>Accepts the current state (e.g. list selection, button press, toggle, etc).</summary>
+    /// <summary>Accepts the current state (e.g. list selection, button press, toggle, etc.).</summary>
     Accept,
     Accept,
 
 
     /// <summary>Selects an item (e.g. a list item or menu item) without necessarily accepting it.</summary>
     /// <summary>Selects an item (e.g. a list item or menu item) without necessarily accepting it.</summary>
     Select,
     Select,
 
 
-    /// <summary>Moves down one item (cell, line, etc...).</summary>
-    LineDown,
-
-    /// <summary>Extends the selection down one (cell, line, etc...).</summary>
-    LineDownExtend,
-
-    /// <summary>Moves down to the last child node of the branch that holds the current selection.</summary>
-    LineDownToLastBranch,
-
-    /// <summary>Scrolls down one (cell, line, etc...) (without changing the selection).</summary>
-    ScrollDown,
+    #endregion
 
 
-    // --------------------------------------------------------------------
+    #region Movement Commands
 
 
     /// <summary>Moves up one (cell, line, etc...).</summary>
     /// <summary>Moves up one (cell, line, etc...).</summary>
-    LineUp,
+    Up,
 
 
-    /// <summary>Extends the selection up one item (cell, line, etc...).</summary>
-    LineUpExtend,
-
-    /// <summary>Moves up to the first child node of the branch that holds the current selection.</summary>
-    LineUpToFirstBranch,
-
-    /// <summary>Scrolls up one item (cell, line, etc...) (without changing the selection).</summary>
-    ScrollUp,
+    /// <summary>Moves down one item (cell, line, etc...).</summary>
+    Down,
 
 
     /// <summary>
     /// <summary>
-    ///     Moves the selection left one by the minimum increment supported by the <see cref="View"/> e.g. single
-    ///     character, cell, item etc.
+    ///     Moves left one (cell, line, etc...).
     /// </summary>
     /// </summary>
     Left,
     Left,
 
 
-    /// <summary>Scrolls one item (cell, character, etc...) to the left</summary>
-    ScrollLeft,
-
     /// <summary>
     /// <summary>
-    ///     Extends the selection left one by the minimum increment supported by the view e.g. single character, cell,
-    ///     item etc.
-    /// </summary>
-    LeftExtend,
-
-    /// <summary>
-    ///     Moves the selection right one by the minimum increment supported by the view e.g. single character, cell, item
-    ///     etc.
+    ///     Moves right one (cell, line, etc...).
     /// </summary>
     /// </summary>
     Right,
     Right,
 
 
-    /// <summary>Scrolls one item (cell, character, etc...) to the right.</summary>
-    ScrollRight,
+    /// <summary>Move one page up.</summary>
+    PageUp,
 
 
-    /// <summary>
-    ///     Extends the selection right one by the minimum increment supported by the view e.g. single character, cell,
-    ///     item etc.
-    /// </summary>
-    RightExtend,
+    /// <summary>Move one page down.</summary>
+    PageDown,
 
 
-    /// <summary>Moves the caret to the start of the previous word.</summary>
-    WordLeft,
+    /// <summary>Moves to the left page.</summary>
+    PageLeft,
 
 
-    /// <summary>Extends the selection to the start of the previous word.</summary>
-    WordLeftExtend,
+    /// <summary>Moves to the right page.</summary>
+    PageRight,
 
 
-    /// <summary>Moves the caret to the start of the next word.</summary>
-    WordRight,
+    /// <summary>Moves to the top of page.</summary>
+    StartOfPage,
 
 
-    /// <summary>Extends the selection to the start of the next word.</summary>
-    WordRightExtend,
+    /// <summary>Moves to the bottom of page.</summary>
+    EndOfPage,
 
 
-    /// <summary>Cuts to the clipboard the characters from the current position to the end of the line.</summary>
-    CutToEndLine,
+    /// <summary>Moves to the start (e.g. the top or home).</summary>
+    Start,
 
 
-    /// <summary>Cuts to the clipboard the characters from the current position to the start of the line.</summary>
-    CutToStartLine,
+    /// <summary>Moves to the end (e.g. the bottom).</summary>
+    End,
 
 
-    /// <summary>Deletes the characters forwards.</summary>
-    KillWordForwards,
+    /// <summary>Moves left to the start on the current row/line.</summary>
+    LeftStart,
 
 
-    /// <summary>Deletes the characters backwards.</summary>
-    KillWordBackwards,
+    /// <summary>Moves right to the end on the current row/line.</summary>
+    RightEnd,
+
+    /// <summary>Moves to the start of the previous word.</summary>
+    WordLeft,
+
+    /// <summary>Moves the start of the next word.</summary>
+    WordRight,
+
+    #endregion
+
+    #region Movement With Extension Commands
+
+    /// <summary>Extends the selection up one item (cell, line, etc...).</summary>
+    UpExtend,
+
+    /// <summary>Extends the selection down one (cell, line, etc...).</summary>
+    DownExtend,
 
 
     /// <summary>
     /// <summary>
-    ///     Toggles overwrite mode such that newly typed text overwrites the text that is already there (typically
-    ///     associated with the Insert key).
+    ///     Extends the selection left one item (cell, line, etc...)
     /// </summary>
     /// </summary>
-    ToggleOverwrite,
+    LeftExtend,
 
 
     /// <summary>
     /// <summary>
-    ///     Enables overwrite mode such that newly typed text overwrites the text that is already there (typically
-    ///     associated with the Insert key).
+    ///     Extends the selection right one item (cell, line, etc...)
     /// </summary>
     /// </summary>
-    EnableOverwrite,
+    RightExtend,
 
 
-    /// <summary>Disables overwrite mode (<see cref="EnableOverwrite"/>)</summary>
-    DisableOverwrite,
+    /// <summary>Extends the selection to the start of the previous word.</summary>
+    WordLeftExtend,
 
 
-    /// <summary>Move one page down.</summary>
-    PageDown,
+    /// <summary>Extends the selection to the start of the next word.</summary>
+    WordRightExtend,
 
 
     /// <summary>Move one page down extending the selection to cover revealed objects/characters.</summary>
     /// <summary>Move one page down extending the selection to cover revealed objects/characters.</summary>
     PageDownExtend,
     PageDownExtend,
 
 
-    /// <summary>Move one page up.</summary>
-    PageUp,
-
     /// <summary>Move one page up extending the selection to cover revealed objects/characters.</summary>
     /// <summary>Move one page up extending the selection to cover revealed objects/characters.</summary>
     PageUpExtend,
     PageUpExtend,
 
 
-    /// <summary>Moves to the top/home.</summary>
-    TopHome,
+    /// <summary>Extends the selection to start (e.g. home or top).</summary>
+    StartExtend,
 
 
-    /// <summary>Extends the selection to the top/home.</summary>
-    TopHomeExtend,
+    /// <summary>Extends the selection to end (e.g. bottom).</summary>
+    EndExtend,
 
 
-    /// <summary>Moves to the bottom/end.</summary>
-    BottomEnd,
+    /// <summary>Extends the selection to the start on the current row/line.</summary>
+    LeftStartExtend,
 
 
-    /// <summary>Extends the selection to the bottom/end.</summary>
-    BottomEndExtend,
+    /// <summary>Extends the selection to the right on the current row/line.</summary>
+    RightEndExtend,
 
 
-    /// <summary>Open the selected item.</summary>
-    OpenSelectedItem,
+    /// <summary>Toggles the selection.</summary>
+    ToggleExtend,
 
 
-    /// <summary>Toggles the Expanded or collapsed state of a list or item (with subitems).</summary>
-    ToggleExpandCollapse,
+    #endregion
 
 
-    /// <summary>Expands a list or item (with subitems).</summary>
-    Expand,
+    #region Editing Commands
 
 
-    /// <summary>Recursively Expands all child items and their child items (if any).</summary>
-    ExpandAll,
+    /// <summary>Deletes the characters forwards.</summary>
+    KillWordForwards,
 
 
-    /// <summary>Collapses a list or item (with subitems).</summary>
-    Collapse,
+    /// <summary>Deletes the characters backwards.</summary>
+    KillWordBackwards,
 
 
-    /// <summary>Recursively collapses a list items of their children (if any).</summary>
-    CollapseAll,
+    /// <summary>
+    ///     Toggles overwrite mode such that newly typed text overwrites the text that is already there (typically
+    ///     associated with the Insert key).
+    /// </summary>
+    ToggleOverwrite,
 
 
-    /// <summary>Cancels an action or any temporary states on the control e.g. expanding a combo list.</summary>
-    Cancel,
+    // QUESTION: What is the difference between EnableOverwrite and ToggleOverwrite?
 
 
-    /// <summary>Unix emulation.</summary>
-    UnixEmulation,
+    /// <summary>
+    ///     Enables overwrite mode such that newly typed text overwrites the text that is already there (typically
+    ///     associated with the Insert key).
+    /// </summary>
+    EnableOverwrite,
+
+    /// <summary>Disables overwrite mode (<see cref="EnableOverwrite"/>)</summary>
+    DisableOverwrite,
 
 
     /// <summary>Deletes the character on the right.</summary>
     /// <summary>Deletes the character on the right.</summary>
     DeleteCharRight,
     DeleteCharRight,
@@ -170,41 +159,41 @@ public enum Command
     /// <summary>Deletes all objects.</summary>
     /// <summary>Deletes all objects.</summary>
     DeleteAll,
     DeleteAll,
 
 
-    /// <summary>Moves the cursor to the start of line.</summary>
-    StartOfLine,
+    /// <summary>Inserts a new item.</summary>
+    NewLine,
 
 
-    /// <summary>Extends the selection to the start of line.</summary>
-    StartOfLineExtend,
+    /// <summary>Unix emulation.</summary>
+    UnixEmulation,
 
 
-    /// <summary>Moves the cursor to the end of line.</summary>
-    EndOfLine,
+    #endregion
 
 
-    /// <summary>Extends the selection to the end of line.</summary>
-    EndOfLineExtend,
+    #region Tree Commands
 
 
-    /// <summary>Moves the cursor to the top of page.</summary>
-    StartOfPage,
+    /// <summary>Moves down to the last child node of the branch that holds the current selection.</summary>
+    LineDownToLastBranch,
 
 
-    /// <summary>Moves the cursor to the bottom of page.</summary>
-    EndOfPage,
+    /// <summary>Moves up to the first child node of the branch that holds the current selection.</summary>
+    LineUpToFirstBranch,
 
 
-    /// <summary>Moves to the left page.</summary>
-    PageLeft,
+    #endregion
 
 
-    /// <summary>Moves to the right page.</summary>
-    PageRight,
+    #region Scroll Commands
 
 
-    /// <summary>Moves to the left begin.</summary>
-    LeftHome,
+    /// <summary>Scrolls down one (cell, line, etc...).</summary>
+    ScrollDown,
 
 
-    /// <summary>Extends the selection to the left begin.</summary>
-    LeftHomeExtend,
+    /// <summary>Scrolls up one item (cell, line, etc...).</summary>
+    ScrollUp,
 
 
-    /// <summary>Moves to the right end.</summary>
-    RightEnd,
+    /// <summary>Scrolls one item (cell, character, etc...) to the left.</summary>
+    ScrollLeft,
 
 
-    /// <summary>Extends the selection to the right end.</summary>
-    RightEndExtend,
+    /// <summary>Scrolls one item (cell, character, etc...) to the right.</summary>
+    ScrollRight,
+
+    #endregion
+
+    #region Clipboard Commands
 
 
     /// <summary>Undo changes.</summary>
     /// <summary>Undo changes.</summary>
     Undo,
     Undo,
@@ -221,35 +210,27 @@ public enum Command
     /// <summary>Pastes the current selection.</summary>
     /// <summary>Pastes the current selection.</summary>
     Paste,
     Paste,
 
 
-    /// TODO: IRunnable: Rename to Command.Quit to make more generic.
-    /// <summary>Quit a <see cref="Toplevel"/>.</summary>
-    QuitToplevel,
-
-    /// TODO: Overlapped: Add Command.ShowHide
-
-    /// <summary>Suspend an application (Only implemented in <see cref="CursesDriver"/>).</summary>
-    Suspend,
+    /// <summary>Cuts to the clipboard the characters from the current position to the end of the line.</summary>
+    CutToEndLine,
 
 
-    /// <summary>Moves focus to the next view.</summary>
-    NextView,
+    /// <summary>Cuts to the clipboard the characters from the current position to the start of the line.</summary>
+    CutToStartLine,
 
 
-    /// <summary>Moves focus to the previous view.</summary>
-    PreviousView,
+    #endregion
 
 
-    /// <summary>Moves focus to the next view or Toplevel (case of Overlapped).</summary>
-    NextViewOrTop,
+    #region Navigation Commands
 
 
-    /// <summary>Moves focus to the next previous or Toplevel (case of Overlapped).</summary>
-    PreviousViewOrTop,
+    /// <summary>Moves focus to the next <see cref="TabBehavior.TabStop"/>.</summary>
+    NextTabStop,
 
 
-    /// <summary>Refresh.</summary>
-    Refresh,
+    /// <summary>Moves focus to the previous <see cref="TabBehavior.TabStop"/>.</summary>
+    PreviousTabStop,
 
 
-    /// <summary>Toggles the selection.</summary>
-    ToggleExtend,
+    /// <summary>Moves focus to the next <see cref="TabBehavior.TabGroup"/>.</summary>
+    NextTabGroup,
 
 
-    /// <summary>Inserts a new item.</summary>
-    NewLine,
+    /// <summary>Moves focus to the next<see cref="TabBehavior.TabGroup"/>.</summary>
+    PreviousTabGroup,
 
 
     /// <summary>Tabs to the next item.</summary>
     /// <summary>Tabs to the next item.</summary>
     Tab,
     Tab,
@@ -257,6 +238,40 @@ public enum Command
     /// <summary>Tabs back to the previous item.</summary>
     /// <summary>Tabs back to the previous item.</summary>
     BackTab,
     BackTab,
 
 
+    #endregion
+
+    #region Action Commands
+
+    /// <summary>Toggles something (e.g. the expanded or collapsed state of a list).</summary>
+    Toggle,
+
+    /// <summary>Expands a list or item (with subitems).</summary>
+    Expand,
+
+    /// <summary>Recursively Expands all child items and their child items (if any).</summary>
+    ExpandAll,
+
+    /// <summary>Collapses a list or item (with subitems).</summary>
+    Collapse,
+
+    /// <summary>Recursively collapses a list items of their children (if any).</summary>
+    CollapseAll,
+
+    /// <summary>Cancels an action or any temporary states on the control e.g. expanding a combo list.</summary>
+    Cancel,
+
+    /// <summary>Quit.</summary>
+    Quit,
+
+    /// <summary>Refresh.</summary>
+    Refresh,
+
+    /// <summary>Suspend an application (Only implemented in <see cref="CursesDriver"/>).</summary>
+    Suspend,
+
+    /// <summary>Open the selected item or invoke a UI for opening something.</summary>
+    Open,
+
     /// <summary>Saves the current document.</summary>
     /// <summary>Saves the current document.</summary>
     Save,
     Save,
 
 
@@ -267,10 +282,12 @@ public enum Command
     New,
     New,
 
 
     /// <summary>Shows context about the item (e.g. a context menu).</summary>
     /// <summary>Shows context about the item (e.g. a context menu).</summary>
-    ShowContextMenu,
+    Context,
 
 
     /// <summary>
     /// <summary>
-    /// Invokes a user interface for editing.
+    ///     Invokes a user interface for editing or configuring something.
     /// </summary>
     /// </summary>
-    Edit
+    Edit,
+
+    #endregion
 }
 }

+ 7 - 7
Terminal.Gui/View/Adornment/Border.cs

@@ -754,9 +754,9 @@ public class Border : Adornment
         };
         };
         Add (_arrangeButton);
         Add (_arrangeButton);
 
 
-        AddCommand (Command.QuitToplevel, EndArrange);
+        AddCommand (Command.Quit, EndArrange);
 
 
-        AddCommand (Command.LineUp,
+        AddCommand (Command.Up,
                     () =>
                     () =>
                     {
                     {
                         if (_arranging == ViewArrangement.Movable)
                         if (_arranging == ViewArrangement.Movable)
@@ -775,7 +775,7 @@ public class Border : Adornment
                         return true;
                         return true;
                     });
                     });
 
 
-        AddCommand (Command.LineDown,
+        AddCommand (Command.Down,
                     () =>
                     () =>
                     {
                     {
                         if (_arranging == ViewArrangement.Movable)
                         if (_arranging == ViewArrangement.Movable)
@@ -853,10 +853,10 @@ public class Border : Adornment
                         return true;
                         return true;
                     });
                     });
 
 
-        KeyBindings.Add (Key.Esc, KeyBindingScope.HotKey, Command.QuitToplevel);
-        KeyBindings.Add (Application.ArrangeKey, KeyBindingScope.HotKey, Command.QuitToplevel);
-        KeyBindings.Add (Key.CursorUp, KeyBindingScope.HotKey, Command.LineUp);
-        KeyBindings.Add (Key.CursorDown, KeyBindingScope.HotKey, Command.LineDown);
+        KeyBindings.Add (Key.Esc, KeyBindingScope.HotKey, Command.Quit);
+        KeyBindings.Add (Application.ArrangeKey, KeyBindingScope.HotKey, Command.Quit);
+        KeyBindings.Add (Key.CursorUp, KeyBindingScope.HotKey, Command.Up);
+        KeyBindings.Add (Key.CursorDown, KeyBindingScope.HotKey, Command.Down);
         KeyBindings.Add (Key.CursorLeft, KeyBindingScope.HotKey, Command.Left);
         KeyBindings.Add (Key.CursorLeft, KeyBindingScope.HotKey, Command.Left);
         KeyBindings.Add (Key.CursorRight, KeyBindingScope.HotKey, Command.Right);
         KeyBindings.Add (Key.CursorRight, KeyBindingScope.HotKey, Command.Right);
 
 

+ 2 - 2
Terminal.Gui/Views/ColorBar.cs

@@ -23,14 +23,14 @@ internal abstract class ColorBar : View, IColorBar
         AddCommand (Command.LeftExtend, _ => Adjust (-MaxValue / 20));
         AddCommand (Command.LeftExtend, _ => Adjust (-MaxValue / 20));
         AddCommand (Command.RightExtend, _ => Adjust (MaxValue / 20));
         AddCommand (Command.RightExtend, _ => Adjust (MaxValue / 20));
 
 
-        AddCommand (Command.LeftHome, _ => SetZero ());
+        AddCommand (Command.LeftStart, _ => SetZero ());
         AddCommand (Command.RightEnd, _ => SetMax ());
         AddCommand (Command.RightEnd, _ => SetMax ());
 
 
         KeyBindings.Add (Key.CursorLeft, Command.Left);
         KeyBindings.Add (Key.CursorLeft, Command.Left);
         KeyBindings.Add (Key.CursorRight, Command.Right);
         KeyBindings.Add (Key.CursorRight, Command.Right);
         KeyBindings.Add (Key.CursorLeft.WithShift, Command.LeftExtend);
         KeyBindings.Add (Key.CursorLeft.WithShift, Command.LeftExtend);
         KeyBindings.Add (Key.CursorRight.WithShift, Command.RightExtend);
         KeyBindings.Add (Key.CursorRight.WithShift, Command.RightExtend);
-        KeyBindings.Add (Key.Home, Command.LeftHome);
+        KeyBindings.Add (Key.Home, Command.LeftStart);
         KeyBindings.Add (Key.End, Command.RightEnd);
         KeyBindings.Add (Key.End, Command.RightEnd);
     }
     }
 
 

+ 4 - 4
Terminal.Gui/Views/ColorPicker16.cs

@@ -166,8 +166,8 @@ public class ColorPicker16 : View
     {
     {
         AddCommand (Command.Left, () => MoveLeft ());
         AddCommand (Command.Left, () => MoveLeft ());
         AddCommand (Command.Right, () => MoveRight ());
         AddCommand (Command.Right, () => MoveRight ());
-        AddCommand (Command.LineUp, () => MoveUp ());
-        AddCommand (Command.LineDown, () => MoveDown ());
+        AddCommand (Command.Up, () => MoveUp ());
+        AddCommand (Command.Down, () => MoveDown ());
     }
     }
 
 
     /// <summary>Add the KeyBindinds.</summary>
     /// <summary>Add the KeyBindinds.</summary>
@@ -175,8 +175,8 @@ public class ColorPicker16 : View
     {
     {
         KeyBindings.Add (Key.CursorLeft, Command.Left);
         KeyBindings.Add (Key.CursorLeft, Command.Left);
         KeyBindings.Add (Key.CursorRight, Command.Right);
         KeyBindings.Add (Key.CursorRight, Command.Right);
-        KeyBindings.Add (Key.CursorUp, Command.LineUp);
-        KeyBindings.Add (Key.CursorDown, Command.LineDown);
+        KeyBindings.Add (Key.CursorUp, Command.Up);
+        KeyBindings.Add (Key.CursorDown, Command.Down);
     }
     }
 
 
     // TODO: Decouple Cursor from SelectedColor so that mouse press-and-hold can show the color under the cursor.
     // TODO: Decouple Cursor from SelectedColor so that mouse press-and-hold can show the color under the cursor.

+ 11 - 11
Terminal.Gui/Views/ComboBox.cs

@@ -77,27 +77,27 @@ public class ComboBox : View, IDesignable
 
 
         // Things this view knows how to do
         // Things this view knows how to do
         AddCommand (Command.Accept, () => ActivateSelected ());
         AddCommand (Command.Accept, () => ActivateSelected ());
-        AddCommand (Command.ToggleExpandCollapse, () => ExpandCollapse ());
+        AddCommand (Command.Toggle, () => ExpandCollapse ());
         AddCommand (Command.Expand, () => Expand ());
         AddCommand (Command.Expand, () => Expand ());
         AddCommand (Command.Collapse, () => Collapse ());
         AddCommand (Command.Collapse, () => Collapse ());
-        AddCommand (Command.LineDown, () => MoveDown ());
-        AddCommand (Command.LineUp, () => MoveUp ());
+        AddCommand (Command.Down, () => MoveDown ());
+        AddCommand (Command.Up, () => MoveUp ());
         AddCommand (Command.PageDown, () => PageDown ());
         AddCommand (Command.PageDown, () => PageDown ());
         AddCommand (Command.PageUp, () => PageUp ());
         AddCommand (Command.PageUp, () => PageUp ());
-        AddCommand (Command.TopHome, () => MoveHome ());
-        AddCommand (Command.BottomEnd, () => MoveEnd ());
+        AddCommand (Command.Start, () => MoveHome ());
+        AddCommand (Command.End, () => MoveEnd ());
         AddCommand (Command.Cancel, () => CancelSelected ());
         AddCommand (Command.Cancel, () => CancelSelected ());
         AddCommand (Command.UnixEmulation, () => UnixEmulation ());
         AddCommand (Command.UnixEmulation, () => UnixEmulation ());
 
 
         // Default keybindings for this view
         // Default keybindings for this view
         KeyBindings.Add (Key.Enter, Command.Accept);
         KeyBindings.Add (Key.Enter, Command.Accept);
-        KeyBindings.Add (Key.F4, Command.ToggleExpandCollapse);
-        KeyBindings.Add (Key.CursorDown, Command.LineDown);
-        KeyBindings.Add (Key.CursorUp, Command.LineUp);
+        KeyBindings.Add (Key.F4, Command.Toggle);
+        KeyBindings.Add (Key.CursorDown, Command.Down);
+        KeyBindings.Add (Key.CursorUp, Command.Up);
         KeyBindings.Add (Key.PageDown, Command.PageDown);
         KeyBindings.Add (Key.PageDown, Command.PageDown);
         KeyBindings.Add (Key.PageUp, Command.PageUp);
         KeyBindings.Add (Key.PageUp, Command.PageUp);
-        KeyBindings.Add (Key.Home, Command.TopHome);
-        KeyBindings.Add (Key.End, Command.BottomEnd);
+        KeyBindings.Add (Key.Home, Command.Start);
+        KeyBindings.Add (Key.End, Command.End);
         KeyBindings.Add (Key.Esc, Command.Cancel);
         KeyBindings.Add (Key.Esc, Command.Cancel);
         KeyBindings.Add (Key.U.WithCtrl, Command.UnixEmulation);
         KeyBindings.Add (Key.U.WithCtrl, Command.UnixEmulation);
     }
     }
@@ -992,7 +992,7 @@ public class ComboBox : View, IDesignable
                                                              "ComboBox container cannot be null."
                                                              "ComboBox container cannot be null."
                                                             );
                                                             );
             HideDropdownListOnClick = hideDropdownListOnClick;
             HideDropdownListOnClick = hideDropdownListOnClick;
-            AddCommand (Command.LineUp, () => _container.MoveUpList ());
+            AddCommand (Command.Up, () => _container.MoveUpList ());
         }
         }
     }
     }
 
 

+ 3 - 3
Terminal.Gui/Views/DateField.cs

@@ -395,7 +395,7 @@ public class DateField : TextField
                         return true;
                         return true;
                     }
                     }
                    );
                    );
-        AddCommand (Command.LeftHome, () => MoveHome ());
+        AddCommand (Command.LeftStart, () => MoveHome ());
         AddCommand (Command.Left, () => MoveLeft ());
         AddCommand (Command.Left, () => MoveLeft ());
         AddCommand (Command.RightEnd, () => MoveEnd ());
         AddCommand (Command.RightEnd, () => MoveEnd ());
         AddCommand (Command.Right, () => MoveRight ());
         AddCommand (Command.Right, () => MoveRight ());
@@ -406,8 +406,8 @@ public class DateField : TextField
 
 
         KeyBindings.ReplaceCommands (Key.Backspace, Command.DeleteCharLeft);
         KeyBindings.ReplaceCommands (Key.Backspace, Command.DeleteCharLeft);
 
 
-        KeyBindings.ReplaceCommands (Key.Home, Command.LeftHome);
-        KeyBindings.ReplaceCommands (Key.A.WithCtrl, Command.LeftHome);
+        KeyBindings.ReplaceCommands (Key.Home, Command.LeftStart);
+        KeyBindings.ReplaceCommands (Key.A.WithCtrl, Command.LeftStart);
 
 
         KeyBindings.ReplaceCommands (Key.CursorLeft, Command.Left);
         KeyBindings.ReplaceCommands (Key.CursorLeft, Command.Left);
         KeyBindings.ReplaceCommands (Key.B.WithCtrl, Command.Left);
         KeyBindings.ReplaceCommands (Key.B.WithCtrl, Command.Left);

+ 4 - 4
Terminal.Gui/Views/FileDialog.cs

@@ -236,10 +236,10 @@ public class FileDialog : Dialog
         _tableView.KeyUp += (s, k) => k.Handled = TableView_KeyUp (k);
         _tableView.KeyUp += (s, k) => k.Handled = TableView_KeyUp (k);
         _tableView.SelectedCellChanged += TableView_SelectedCellChanged;
         _tableView.SelectedCellChanged += TableView_SelectedCellChanged;
 
 
-        _tableView.KeyBindings.ReplaceCommands (Key.Home, Command.TopHome);
-        _tableView.KeyBindings.ReplaceCommands (Key.End, Command.BottomEnd);
-        _tableView.KeyBindings.ReplaceCommands (Key.Home.WithShift, Command.TopHomeExtend);
-        _tableView.KeyBindings.ReplaceCommands (Key.End.WithShift, Command.BottomEndExtend);
+        _tableView.KeyBindings.ReplaceCommands (Key.Home, Command.Start);
+        _tableView.KeyBindings.ReplaceCommands (Key.End, Command.End);
+        _tableView.KeyBindings.ReplaceCommands (Key.Home.WithShift, Command.StartExtend);
+        _tableView.KeyBindings.ReplaceCommands (Key.End.WithShift, Command.EndExtend);
         
         
         AllowsMultipleSelection = false;
         AllowsMultipleSelection = false;
 
 

+ 13 - 13
Terminal.Gui/Views/HexView.cs

@@ -59,15 +59,15 @@ public class HexView : View
         // Things this view knows how to do
         // Things this view knows how to do
         AddCommand (Command.Left, () => MoveLeft ());
         AddCommand (Command.Left, () => MoveLeft ());
         AddCommand (Command.Right, () => MoveRight ());
         AddCommand (Command.Right, () => MoveRight ());
-        AddCommand (Command.LineDown, () => MoveDown (bytesPerLine));
-        AddCommand (Command.LineUp, () => MoveUp (bytesPerLine));
+        AddCommand (Command.Down, () => MoveDown (bytesPerLine));
+        AddCommand (Command.Up, () => MoveUp (bytesPerLine));
         AddCommand (Command.Accept, () => ToggleSide ());
         AddCommand (Command.Accept, () => ToggleSide ());
         AddCommand (Command.PageUp, () => MoveUp (bytesPerLine * Frame.Height));
         AddCommand (Command.PageUp, () => MoveUp (bytesPerLine * Frame.Height));
         AddCommand (Command.PageDown, () => MoveDown (bytesPerLine * Frame.Height));
         AddCommand (Command.PageDown, () => MoveDown (bytesPerLine * Frame.Height));
-        AddCommand (Command.TopHome, () => MoveHome ());
-        AddCommand (Command.BottomEnd, () => MoveEnd ());
-        AddCommand (Command.StartOfLine, () => MoveStartOfLine ());
-        AddCommand (Command.EndOfLine, () => MoveEndOfLine ());
+        AddCommand (Command.Start, () => MoveHome ());
+        AddCommand (Command.End, () => MoveEnd ());
+        AddCommand (Command.LeftStart, () => MoveLeftStart ());
+        AddCommand (Command.RightEnd, () => MoveEndOfLine ());
         AddCommand (Command.StartOfPage, () => MoveUp (bytesPerLine * ((int)(position - displayStart) / bytesPerLine)));
         AddCommand (Command.StartOfPage, () => MoveUp (bytesPerLine * ((int)(position - displayStart) / bytesPerLine)));
 
 
         AddCommand (
         AddCommand (
@@ -78,8 +78,8 @@ public class HexView : View
         // Default keybindings for this view
         // Default keybindings for this view
         KeyBindings.Add (Key.CursorLeft, Command.Left);
         KeyBindings.Add (Key.CursorLeft, Command.Left);
         KeyBindings.Add (Key.CursorRight, Command.Right);
         KeyBindings.Add (Key.CursorRight, Command.Right);
-        KeyBindings.Add (Key.CursorDown, Command.LineDown);
-        KeyBindings.Add (Key.CursorUp, Command.LineUp);
+        KeyBindings.Add (Key.CursorDown, Command.Down);
+        KeyBindings.Add (Key.CursorUp, Command.Up);
         KeyBindings.Add (Key.Enter, Command.Accept);
         KeyBindings.Add (Key.Enter, Command.Accept);
 
 
         KeyBindings.Add (Key.V.WithAlt, Command.PageUp);
         KeyBindings.Add (Key.V.WithAlt, Command.PageUp);
@@ -88,10 +88,10 @@ public class HexView : View
         KeyBindings.Add (Key.V.WithCtrl, Command.PageDown);
         KeyBindings.Add (Key.V.WithCtrl, Command.PageDown);
         KeyBindings.Add (Key.PageDown, Command.PageDown);
         KeyBindings.Add (Key.PageDown, Command.PageDown);
 
 
-        KeyBindings.Add (Key.Home, Command.TopHome);
-        KeyBindings.Add (Key.End, Command.BottomEnd);
-        KeyBindings.Add (Key.CursorLeft.WithCtrl, Command.StartOfLine);
-        KeyBindings.Add (Key.CursorRight.WithCtrl, Command.EndOfLine);
+        KeyBindings.Add (Key.Home, Command.Start);
+        KeyBindings.Add (Key.End, Command.End);
+        KeyBindings.Add (Key.CursorLeft.WithCtrl, Command.LeftStart);
+        KeyBindings.Add (Key.CursorRight.WithCtrl, Command.RightEnd);
         KeyBindings.Add (Key.CursorUp.WithCtrl, Command.StartOfPage);
         KeyBindings.Add (Key.CursorUp.WithCtrl, Command.StartOfPage);
         KeyBindings.Add (Key.CursorDown.WithCtrl, Command.EndOfPage);
         KeyBindings.Add (Key.CursorDown.WithCtrl, Command.EndOfPage);
 
 
@@ -728,7 +728,7 @@ public class HexView : View
         return true;
         return true;
     }
     }
 
 
-    private bool MoveStartOfLine ()
+    private bool MoveLeftStart ()
     {
     {
         position = position / bytesPerLine * bytesPerLine;
         position = position / bytesPerLine * bytesPerLine;
         SetNeedsDisplay ();
         SetNeedsDisplay ();

+ 12 - 12
Terminal.Gui/Views/ListView.cs

@@ -124,39 +124,39 @@ public class ListView : View, IDesignable
         // Things this view knows how to do
         // Things this view knows how to do
         // 
         // 
         // BUGBUG: SHould return false if selectokn doesn't change (to support nav to next view)
         // BUGBUG: SHould return false if selectokn doesn't change (to support nav to next view)
-        AddCommand (Command.LineUp, () => MoveUp ());
+        AddCommand (Command.Up, () => MoveUp ());
         // BUGBUG: SHould return false if selectokn doesn't change (to support nav to next view)
         // BUGBUG: SHould return false if selectokn doesn't change (to support nav to next view)
-        AddCommand (Command.LineDown, () => MoveDown ());
+        AddCommand (Command.Down, () => MoveDown ());
         AddCommand (Command.ScrollUp, () => ScrollVertical (-1));
         AddCommand (Command.ScrollUp, () => ScrollVertical (-1));
         AddCommand (Command.ScrollDown, () => ScrollVertical (1));
         AddCommand (Command.ScrollDown, () => ScrollVertical (1));
         AddCommand (Command.PageUp, () => MovePageUp ());
         AddCommand (Command.PageUp, () => MovePageUp ());
         AddCommand (Command.PageDown, () => MovePageDown ());
         AddCommand (Command.PageDown, () => MovePageDown ());
-        AddCommand (Command.TopHome, () => MoveHome ());
-        AddCommand (Command.BottomEnd, () => MoveEnd ());
+        AddCommand (Command.Start, () => MoveHome ());
+        AddCommand (Command.End, () => MoveEnd ());
         AddCommand (Command.Accept, () => OnOpenSelectedItem ());
         AddCommand (Command.Accept, () => OnOpenSelectedItem ());
-        AddCommand (Command.OpenSelectedItem, () => OnOpenSelectedItem ());
+        AddCommand (Command.Open, () => OnOpenSelectedItem ());
         AddCommand (Command.Select, () => MarkUnmarkRow ());
         AddCommand (Command.Select, () => MarkUnmarkRow ());
 
 
         AddCommand (Command.ScrollLeft, () => ScrollHorizontal (-1));
         AddCommand (Command.ScrollLeft, () => ScrollHorizontal (-1));
         AddCommand (Command.ScrollRight, () => ScrollHorizontal (1));
         AddCommand (Command.ScrollRight, () => ScrollHorizontal (1));
 
 
         // Default keybindings for all ListViews
         // Default keybindings for all ListViews
-        KeyBindings.Add (Key.CursorUp, Command.LineUp);
-        KeyBindings.Add (Key.P.WithCtrl, Command.LineUp);
+        KeyBindings.Add (Key.CursorUp, Command.Up);
+        KeyBindings.Add (Key.P.WithCtrl, Command.Up);
 
 
-        KeyBindings.Add (Key.CursorDown, Command.LineDown);
-        KeyBindings.Add (Key.N.WithCtrl, Command.LineDown);
+        KeyBindings.Add (Key.CursorDown, Command.Down);
+        KeyBindings.Add (Key.N.WithCtrl, Command.Down);
 
 
         KeyBindings.Add (Key.PageUp, Command.PageUp);
         KeyBindings.Add (Key.PageUp, Command.PageUp);
 
 
         KeyBindings.Add (Key.PageDown, Command.PageDown);
         KeyBindings.Add (Key.PageDown, Command.PageDown);
         KeyBindings.Add (Key.V.WithCtrl, Command.PageDown);
         KeyBindings.Add (Key.V.WithCtrl, Command.PageDown);
 
 
-        KeyBindings.Add (Key.Home, Command.TopHome);
+        KeyBindings.Add (Key.Home, Command.Start);
 
 
-        KeyBindings.Add (Key.End, Command.BottomEnd);
+        KeyBindings.Add (Key.End, Command.End);
 
 
-        KeyBindings.Add (Key.Enter, Command.OpenSelectedItem);
+        KeyBindings.Add (Key.Enter, Command.Open);
     }
     }
 
 
     /// <summary>Gets or sets whether this <see cref="ListView"/> allows items to be marked.</summary>
     /// <summary>Gets or sets whether this <see cref="ListView"/> allows items to be marked.</summary>

+ 6 - 6
Terminal.Gui/Views/Menu/Menu.cs

@@ -153,8 +153,8 @@ internal sealed class Menu : View
         Application.MouseEvent += Application_RootMouseEvent;
         Application.MouseEvent += Application_RootMouseEvent;
 
 
         // Things this view knows how to do
         // Things this view knows how to do
-        AddCommand (Command.LineUp, () => MoveUp ());
-        AddCommand (Command.LineDown, () => MoveDown ());
+        AddCommand (Command.Up, () => MoveUp ());
+        AddCommand (Command.Down, () => MoveDown ());
 
 
         AddCommand (
         AddCommand (
                     Command.Left,
                     Command.Left,
@@ -186,12 +186,12 @@ internal sealed class Menu : View
                     }
                     }
                    );
                    );
         AddCommand (Command.Select, ctx => _host?.SelectItem ((ctx.KeyBinding?.Context as MenuItem)!));
         AddCommand (Command.Select, ctx => _host?.SelectItem ((ctx.KeyBinding?.Context as MenuItem)!));
-        AddCommand (Command.ToggleExpandCollapse, ctx => ExpandCollapse ((ctx.KeyBinding?.Context as MenuItem)!));
+        AddCommand (Command.Toggle, ctx => ExpandCollapse ((ctx.KeyBinding?.Context as MenuItem)!));
         AddCommand (Command.HotKey, ctx => _host?.SelectItem ((ctx.KeyBinding?.Context as MenuItem)!));
         AddCommand (Command.HotKey, ctx => _host?.SelectItem ((ctx.KeyBinding?.Context as MenuItem)!));
 
 
         // Default key bindings for this view
         // Default key bindings for this view
-        KeyBindings.Add (Key.CursorUp, Command.LineUp);
-        KeyBindings.Add (Key.CursorDown, Command.LineDown);
+        KeyBindings.Add (Key.CursorUp, Command.Up);
+        KeyBindings.Add (Key.CursorDown, Command.Down);
         KeyBindings.Add (Key.CursorLeft, Command.Left);
         KeyBindings.Add (Key.CursorLeft, Command.Left);
         KeyBindings.Add (Key.CursorRight, Command.Right);
         KeyBindings.Add (Key.CursorRight, Command.Right);
         KeyBindings.Add (Key.Esc, Command.Cancel);
         KeyBindings.Add (Key.Esc, Command.Cancel);
@@ -209,7 +209,7 @@ internal sealed class Menu : View
 
 
         foreach (MenuItem menuItem in menuItems)
         foreach (MenuItem menuItem in menuItems)
         {
         {
-            KeyBinding keyBinding = new ([Command.ToggleExpandCollapse], KeyBindingScope.HotKey, menuItem);
+            KeyBinding keyBinding = new ([Command.Toggle], KeyBindingScope.HotKey, menuItem);
 
 
             if (menuItem.HotKey != Key.Empty)
             if (menuItem.HotKey != Key.Empty)
             {
             {

+ 5 - 5
Terminal.Gui/Views/Menu/MenuBar.cs

@@ -126,7 +126,7 @@ public class MenuBar : View, IDesignable
                         return true;
                         return true;
                     }
                     }
                    );
                    );
-        AddCommand (Command.ToggleExpandCollapse, ctx =>
+        AddCommand (Command.Toggle, ctx =>
                                                   {
                                                   {
                                                       CloseOtherOpenedMenuBar ();
                                                       CloseOtherOpenedMenuBar ();
 
 
@@ -147,7 +147,7 @@ public class MenuBar : View, IDesignable
         KeyBindings.Add (Key.CursorDown, Command.Accept);
         KeyBindings.Add (Key.CursorDown, Command.Accept);
         KeyBindings.Add (Key.Enter, Command.Accept);
         KeyBindings.Add (Key.Enter, Command.Accept);
 
 
-        KeyBinding keyBinding = new ([Command.ToggleExpandCollapse], KeyBindingScope.HotKey, -1); // -1 indicates Key was used
+        KeyBinding keyBinding = new ([Command.Toggle], KeyBindingScope.HotKey, -1); // -1 indicates Key was used
         KeyBindings.Add (Key, keyBinding);
         KeyBindings.Add (Key, keyBinding);
 
 
         // TODO: Why do we have two keybindings for opening the menu? Ctrl-Space and Key?
         // TODO: Why do we have two keybindings for opening the menu? Ctrl-Space and Key?
@@ -190,10 +190,10 @@ public class MenuBar : View, IDesignable
                 if (menuBarItem.HotKey != Key.Empty)
                 if (menuBarItem.HotKey != Key.Empty)
                 {
                 {
                     KeyBindings.Remove (menuBarItem.HotKey!);
                     KeyBindings.Remove (menuBarItem.HotKey!);
-                    KeyBinding keyBinding = new ([Command.ToggleExpandCollapse], KeyBindingScope.Focused, menuBarItem);
+                    KeyBinding keyBinding = new ([Command.Toggle], KeyBindingScope.Focused, menuBarItem);
                     KeyBindings.Add (menuBarItem.HotKey!, keyBinding);
                     KeyBindings.Add (menuBarItem.HotKey!, keyBinding);
                     KeyBindings.Remove (menuBarItem.HotKey!.WithAlt);
                     KeyBindings.Remove (menuBarItem.HotKey!.WithAlt);
-                    keyBinding = new ([Command.ToggleExpandCollapse], KeyBindingScope.HotKey, menuBarItem);
+                    keyBinding = new ([Command.Toggle], KeyBindingScope.HotKey, menuBarItem);
                     KeyBindings.Add (menuBarItem.HotKey.WithAlt, keyBinding);
                     KeyBindings.Add (menuBarItem.HotKey.WithAlt, keyBinding);
                 }
                 }
 
 
@@ -1272,7 +1272,7 @@ public class MenuBar : View, IDesignable
             }
             }
 
 
             KeyBindings.Remove (_key);
             KeyBindings.Remove (_key);
-            KeyBinding keyBinding = new ([Command.ToggleExpandCollapse], KeyBindingScope.HotKey, -1); // -1 indicates Key was used
+            KeyBinding keyBinding = new ([Command.Toggle], KeyBindingScope.HotKey, -1); // -1 indicates Key was used
             KeyBindings.Add (value, keyBinding);
             KeyBindings.Add (value, keyBinding);
             _key = value;
             _key = value;
         }
         }

+ 1 - 1
Terminal.Gui/Views/Menu/MenuItem.cs

@@ -325,7 +325,7 @@ public class MenuItem
             if (index > -1)
             if (index > -1)
             {
             {
                 _menuBar.KeyBindings.Remove (HotKey!.WithAlt);
                 _menuBar.KeyBindings.Remove (HotKey!.WithAlt);
-                KeyBinding keyBinding = new ([Command.ToggleExpandCollapse], KeyBindingScope.HotKey, this);
+                KeyBinding keyBinding = new ([Command.Toggle], KeyBindingScope.HotKey, this);
                 _menuBar.KeyBindings.Add (HotKey.WithAlt, keyBinding);
                 _menuBar.KeyBindings.Add (HotKey.WithAlt, keyBinding);
             }
             }
         }
         }

+ 10 - 10
Terminal.Gui/Views/RadioGroup.cs

@@ -22,7 +22,7 @@ public class RadioGroup : View, IDesignable, IOrientation
 
 
         // Things this view knows how to do
         // Things this view knows how to do
         AddCommand (
         AddCommand (
-                    Command.LineUp,
+                    Command.Up,
                     () =>
                     () =>
                     {
                     {
                         if (!HasFocus)
                         if (!HasFocus)
@@ -35,7 +35,7 @@ public class RadioGroup : View, IDesignable, IOrientation
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.LineDown,
+                    Command.Down,
                     () =>
                     () =>
                     {
                     {
                         if (!HasFocus)
                         if (!HasFocus)
@@ -47,7 +47,7 @@ public class RadioGroup : View, IDesignable, IOrientation
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.TopHome,
+                    Command.Start,
                     () =>
                     () =>
                     {
                     {
                         if (!HasFocus)
                         if (!HasFocus)
@@ -62,7 +62,7 @@ public class RadioGroup : View, IDesignable, IOrientation
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.BottomEnd,
+                    Command.End,
                     () =>
                     () =>
                     {
                     {
                         if (!HasFocus)
                         if (!HasFocus)
@@ -125,17 +125,17 @@ public class RadioGroup : View, IDesignable, IOrientation
         // Default keybindings for this view
         // Default keybindings for this view
         if (Orientation == Orientation.Vertical)
         if (Orientation == Orientation.Vertical)
         {
         {
-            KeyBindings.Add (Key.CursorUp, Command.LineUp);
-            KeyBindings.Add (Key.CursorDown, Command.LineDown);
+            KeyBindings.Add (Key.CursorUp, Command.Up);
+            KeyBindings.Add (Key.CursorDown, Command.Down);
         }
         }
         else
         else
         {
         {
-            KeyBindings.Add (Key.CursorLeft, Command.LineUp);
-            KeyBindings.Add (Key.CursorRight, Command.LineDown);
+            KeyBindings.Add (Key.CursorLeft, Command.Up);
+            KeyBindings.Add (Key.CursorRight, Command.Down);
         }
         }
 
 
-        KeyBindings.Add (Key.Home, Command.TopHome);
-        KeyBindings.Add (Key.End, Command.BottomEnd);
+        KeyBindings.Add (Key.Home, Command.Start);
+        KeyBindings.Add (Key.End, Command.End);
         KeyBindings.Add (Key.Space, Command.Accept);
         KeyBindings.Add (Key.Space, Command.Accept);
     }
     }
 
 

+ 6 - 6
Terminal.Gui/Views/ScrollView.cs

@@ -88,9 +88,9 @@ public class ScrollView : View
         AddCommand (Command.PageDown, () => ScrollDown (Viewport.Height));
         AddCommand (Command.PageDown, () => ScrollDown (Viewport.Height));
         AddCommand (Command.PageLeft, () => ScrollLeft (Viewport.Width));
         AddCommand (Command.PageLeft, () => ScrollLeft (Viewport.Width));
         AddCommand (Command.PageRight, () => ScrollRight (Viewport.Width));
         AddCommand (Command.PageRight, () => ScrollRight (Viewport.Width));
-        AddCommand (Command.TopHome, () => ScrollUp (GetContentSize ().Height));
-        AddCommand (Command.BottomEnd, () => ScrollDown (GetContentSize ().Height));
-        AddCommand (Command.LeftHome, () => ScrollLeft (GetContentSize ().Width));
+        AddCommand (Command.Start, () => ScrollUp (GetContentSize ().Height));
+        AddCommand (Command.End, () => ScrollDown (GetContentSize ().Height));
+        AddCommand (Command.LeftStart, () => ScrollLeft (GetContentSize ().Width));
         AddCommand (Command.RightEnd, () => ScrollRight (GetContentSize ().Width));
         AddCommand (Command.RightEnd, () => ScrollRight (GetContentSize ().Width));
 
 
         // Default keybindings for this view
         // Default keybindings for this view
@@ -107,9 +107,9 @@ public class ScrollView : View
 
 
         KeyBindings.Add (Key.PageUp.WithCtrl, Command.PageLeft);
         KeyBindings.Add (Key.PageUp.WithCtrl, Command.PageLeft);
         KeyBindings.Add (Key.PageDown.WithCtrl, Command.PageRight);
         KeyBindings.Add (Key.PageDown.WithCtrl, Command.PageRight);
-        KeyBindings.Add (Key.Home, Command.TopHome);
-        KeyBindings.Add (Key.End, Command.BottomEnd);
-        KeyBindings.Add (Key.Home.WithCtrl, Command.LeftHome);
+        KeyBindings.Add (Key.Home, Command.Start);
+        KeyBindings.Add (Key.End, Command.End);
+        KeyBindings.Add (Key.Home.WithCtrl, Command.LeftStart);
         KeyBindings.Add (Key.End.WithCtrl, Command.RightEnd);
         KeyBindings.Add (Key.End.WithCtrl, Command.RightEnd);
 
 
         Initialized += (s, e) =>
         Initialized += (s, e) =>

+ 6 - 6
Terminal.Gui/Views/Slider.cs

@@ -1413,10 +1413,10 @@ public class Slider<T> : View, IOrientation
     private void SetCommands ()
     private void SetCommands ()
     {
     {
         AddCommand (Command.Right, () => MovePlus ());
         AddCommand (Command.Right, () => MovePlus ());
-        AddCommand (Command.LineDown, () => MovePlus ());
+        AddCommand (Command.Down, () => MovePlus ());
         AddCommand (Command.Left, () => MoveMinus ());
         AddCommand (Command.Left, () => MoveMinus ());
-        AddCommand (Command.LineUp, () => MoveMinus ());
-        AddCommand (Command.LeftHome, () => MoveStart ());
+        AddCommand (Command.Up, () => MoveMinus ());
+        AddCommand (Command.LeftStart, () => MoveStart ());
         AddCommand (Command.RightEnd, () => MoveEnd ());
         AddCommand (Command.RightEnd, () => MoveEnd ());
         AddCommand (Command.RightExtend, () => ExtendPlus ());
         AddCommand (Command.RightExtend, () => ExtendPlus ());
         AddCommand (Command.LeftExtend, () => ExtendMinus ());
         AddCommand (Command.LeftExtend, () => ExtendMinus ());
@@ -1444,9 +1444,9 @@ public class Slider<T> : View, IOrientation
         else
         else
         {
         {
             KeyBindings.Remove (Key.CursorRight);
             KeyBindings.Remove (Key.CursorRight);
-            KeyBindings.Add (Key.CursorDown, Command.LineDown);
+            KeyBindings.Add (Key.CursorDown, Command.Down);
             KeyBindings.Remove (Key.CursorLeft);
             KeyBindings.Remove (Key.CursorLeft);
-            KeyBindings.Add (Key.CursorUp, Command.LineUp);
+            KeyBindings.Add (Key.CursorUp, Command.Up);
 
 
             KeyBindings.Remove (Key.CursorRight.WithCtrl);
             KeyBindings.Remove (Key.CursorRight.WithCtrl);
             KeyBindings.Add (Key.CursorDown.WithCtrl, Command.RightExtend);
             KeyBindings.Add (Key.CursorDown.WithCtrl, Command.RightExtend);
@@ -1455,7 +1455,7 @@ public class Slider<T> : View, IOrientation
         }
         }
 
 
         KeyBindings.Remove (Key.Home);
         KeyBindings.Remove (Key.Home);
-        KeyBindings.Add (Key.Home, Command.LeftHome);
+        KeyBindings.Add (Key.Home, Command.LeftStart);
         KeyBindings.Remove (Key.End);
         KeyBindings.Remove (Key.End);
         KeyBindings.Add (Key.End, Command.RightEnd);
         KeyBindings.Add (Key.End, Command.RightEnd);
         KeyBindings.Remove (Key.Enter);
         KeyBindings.Remove (Key.Enter);

+ 2 - 2
Terminal.Gui/Views/TabView.cs

@@ -44,7 +44,7 @@ public class TabView : View
         AddCommand (Command.Right, () => SwitchTabBy (1));
         AddCommand (Command.Right, () => SwitchTabBy (1));
 
 
         AddCommand (
         AddCommand (
-                    Command.LeftHome,
+                    Command.LeftStart,
                     () =>
                     () =>
                     {
                     {
                         TabScrollOffset = 0;
                         TabScrollOffset = 0;
@@ -90,7 +90,7 @@ public class TabView : View
         // Default keybindings for this view
         // Default keybindings for this view
         KeyBindings.Add (Key.CursorLeft, Command.Left);
         KeyBindings.Add (Key.CursorLeft, Command.Left);
         KeyBindings.Add (Key.CursorRight, Command.Right);
         KeyBindings.Add (Key.CursorRight, Command.Right);
-        KeyBindings.Add (Key.Home, Command.LeftHome);
+        KeyBindings.Add (Key.Home, Command.LeftStart);
         KeyBindings.Add (Key.End, Command.RightEnd);
         KeyBindings.Add (Key.End, Command.RightEnd);
         KeyBindings.Add (Key.PageDown, Command.PageDown);
         KeyBindings.Add (Key.PageDown, Command.PageDown);
         KeyBindings.Add (Key.PageUp, Command.PageUp);
         KeyBindings.Add (Key.PageUp, Command.PageUp);

+ 20 - 20
Terminal.Gui/Views/TableView/TableView.cs

@@ -61,11 +61,11 @@ public class TableView : View
                     () => ChangeSelectionByOffsetWithReturn (-1, 0));
                     () => ChangeSelectionByOffsetWithReturn (-1, 0));
 
 
         AddCommand (
         AddCommand (
-                    Command.LineUp,
+                    Command.Up,
                     () => ChangeSelectionByOffsetWithReturn (0, -1));
                     () => ChangeSelectionByOffsetWithReturn (0, -1));
 
 
         AddCommand (
         AddCommand (
-                    Command.LineDown,
+                    Command.Down,
                     () => ChangeSelectionByOffsetWithReturn (0, 1));
                     () => ChangeSelectionByOffsetWithReturn (0, 1));
 
 
         AddCommand (
         AddCommand (
@@ -89,7 +89,7 @@ public class TableView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.LeftHome,
+                    Command.LeftStart,
                     () =>
                     () =>
                     {
                     {
                         ChangeSelectionToStartOfRow (false);
                         ChangeSelectionToStartOfRow (false);
@@ -109,7 +109,7 @@ public class TableView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.TopHome,
+                    Command.Start,
                     () =>
                     () =>
                     {
                     {
                         ChangeSelectionToStartOfTable (false);
                         ChangeSelectionToStartOfTable (false);
@@ -119,7 +119,7 @@ public class TableView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.BottomEnd,
+                    Command.End,
                     () =>
                     () =>
                     {
                     {
                         ChangeSelectionToEndOfTable (false);
                         ChangeSelectionToEndOfTable (false);
@@ -149,7 +149,7 @@ public class TableView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.LineUpExtend,
+                    Command.UpExtend,
                     () =>
                     () =>
                     {
                     {
                         ChangeSelectionByOffset (0, -1, true);
                         ChangeSelectionByOffset (0, -1, true);
@@ -159,7 +159,7 @@ public class TableView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.LineDownExtend,
+                    Command.DownExtend,
                     () =>
                     () =>
                     {
                     {
                         ChangeSelectionByOffset (0, 1, true);
                         ChangeSelectionByOffset (0, 1, true);
@@ -189,7 +189,7 @@ public class TableView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.LeftHomeExtend,
+                    Command.LeftStartExtend,
                     () =>
                     () =>
                     {
                     {
                         ChangeSelectionToStartOfRow (true);
                         ChangeSelectionToStartOfRow (true);
@@ -209,7 +209,7 @@ public class TableView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.TopHomeExtend,
+                    Command.StartExtend,
                     () =>
                     () =>
                     {
                     {
                         ChangeSelectionToStartOfTable (true);
                         ChangeSelectionToStartOfTable (true);
@@ -219,7 +219,7 @@ public class TableView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.BottomEndExtend,
+                    Command.EndExtend,
                     () =>
                     () =>
                     {
                     {
                         ChangeSelectionToEndOfTable (true);
                         ChangeSelectionToEndOfTable (true);
@@ -262,25 +262,25 @@ public class TableView : View
         // Default keybindings for this view
         // Default keybindings for this view
         KeyBindings.Add (Key.CursorLeft, Command.Left);
         KeyBindings.Add (Key.CursorLeft, Command.Left);
         KeyBindings.Add (Key.CursorRight, Command.Right);
         KeyBindings.Add (Key.CursorRight, Command.Right);
-        KeyBindings.Add (Key.CursorUp, Command.LineUp);
-        KeyBindings.Add (Key.CursorDown, Command.LineDown);
+        KeyBindings.Add (Key.CursorUp, Command.Up);
+        KeyBindings.Add (Key.CursorDown, Command.Down);
         KeyBindings.Add (Key.PageUp, Command.PageUp);
         KeyBindings.Add (Key.PageUp, Command.PageUp);
         KeyBindings.Add (Key.PageDown, Command.PageDown);
         KeyBindings.Add (Key.PageDown, Command.PageDown);
-        KeyBindings.Add (Key.Home, Command.LeftHome);
+        KeyBindings.Add (Key.Home, Command.LeftStart);
         KeyBindings.Add (Key.End, Command.RightEnd);
         KeyBindings.Add (Key.End, Command.RightEnd);
-        KeyBindings.Add (Key.Home.WithCtrl, Command.TopHome);
-        KeyBindings.Add (Key.End.WithCtrl, Command.BottomEnd);
+        KeyBindings.Add (Key.Home.WithCtrl, Command.Start);
+        KeyBindings.Add (Key.End.WithCtrl, Command.End);
 
 
         KeyBindings.Add (Key.CursorLeft.WithShift, Command.LeftExtend);
         KeyBindings.Add (Key.CursorLeft.WithShift, Command.LeftExtend);
         KeyBindings.Add (Key.CursorRight.WithShift, Command.RightExtend);
         KeyBindings.Add (Key.CursorRight.WithShift, Command.RightExtend);
-        KeyBindings.Add (Key.CursorUp.WithShift, Command.LineUpExtend);
-        KeyBindings.Add (Key.CursorDown.WithShift, Command.LineDownExtend);
+        KeyBindings.Add (Key.CursorUp.WithShift, Command.UpExtend);
+        KeyBindings.Add (Key.CursorDown.WithShift, Command.DownExtend);
         KeyBindings.Add (Key.PageUp.WithShift, Command.PageUpExtend);
         KeyBindings.Add (Key.PageUp.WithShift, Command.PageUpExtend);
         KeyBindings.Add (Key.PageDown.WithShift, Command.PageDownExtend);
         KeyBindings.Add (Key.PageDown.WithShift, Command.PageDownExtend);
-        KeyBindings.Add (Key.Home.WithShift, Command.LeftHomeExtend);
+        KeyBindings.Add (Key.Home.WithShift, Command.LeftStartExtend);
         KeyBindings.Add (Key.End.WithShift, Command.RightEndExtend);
         KeyBindings.Add (Key.End.WithShift, Command.RightEndExtend);
-        KeyBindings.Add (Key.Home.WithCtrl.WithShift, Command.TopHomeExtend);
-        KeyBindings.Add (Key.End.WithCtrl.WithShift, Command.BottomEndExtend);
+        KeyBindings.Add (Key.Home.WithCtrl.WithShift, Command.StartExtend);
+        KeyBindings.Add (Key.End.WithCtrl.WithShift, Command.EndExtend);
 
 
         KeyBindings.Add (Key.A.WithCtrl, Command.SelectAll);
         KeyBindings.Add (Key.A.WithCtrl, Command.SelectAll);
         KeyBindings.Add (CellActivationKey, Command.Accept);
         KeyBindings.Add (CellActivationKey, Command.Accept);

+ 10 - 10
Terminal.Gui/Views/TextField.cs

@@ -72,7 +72,7 @@ public class TextField : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.LeftHomeExtend,
+                    Command.LeftStartExtend,
                     () =>
                     () =>
                     {
                     {
                         MoveHomeExtend ();
                         MoveHomeExtend ();
@@ -92,7 +92,7 @@ public class TextField : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.LeftHome,
+                    Command.LeftStart,
                     () =>
                     () =>
                     {
                     {
                         MoveHome ();
                         MoveHome ();
@@ -316,7 +316,7 @@ public class TextField : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.ShowContextMenu,
+                    Command.Context,
                     () =>
                     () =>
                     {
                     {
                         ShowContextMenu ();
                         ShowContextMenu ();
@@ -336,17 +336,17 @@ public class TextField : View
 
 
         KeyBindings.Add (Key.Backspace, Command.DeleteCharLeft);
         KeyBindings.Add (Key.Backspace, Command.DeleteCharLeft);
 
 
-        KeyBindings.Add (Key.Home.WithShift, Command.LeftHomeExtend);
-        KeyBindings.Add (Key.Home.WithShift.WithCtrl, Command.LeftHomeExtend);
-        KeyBindings.Add (Key.A.WithShift.WithCtrl, Command.LeftHomeExtend);
+        KeyBindings.Add (Key.Home.WithShift, Command.LeftStartExtend);
+        KeyBindings.Add (Key.Home.WithShift.WithCtrl, Command.LeftStartExtend);
+        KeyBindings.Add (Key.A.WithShift.WithCtrl, Command.LeftStartExtend);
 
 
         KeyBindings.Add (Key.End.WithShift, Command.RightEndExtend);
         KeyBindings.Add (Key.End.WithShift, Command.RightEndExtend);
         KeyBindings.Add (Key.End.WithShift.WithCtrl, Command.RightEndExtend);
         KeyBindings.Add (Key.End.WithShift.WithCtrl, Command.RightEndExtend);
         KeyBindings.Add (Key.E.WithShift.WithCtrl, Command.RightEndExtend);
         KeyBindings.Add (Key.E.WithShift.WithCtrl, Command.RightEndExtend);
 
 
-        KeyBindings.Add (Key.Home, Command.LeftHome);
-        KeyBindings.Add (Key.Home.WithCtrl, Command.LeftHome);
-        KeyBindings.Add (Key.A.WithCtrl, Command.LeftHome);
+        KeyBindings.Add (Key.Home, Command.LeftStart);
+        KeyBindings.Add (Key.Home.WithCtrl, Command.LeftStart);
+        KeyBindings.Add (Key.A.WithCtrl, Command.LeftStart);
 
 
         KeyBindings.Add (Key.CursorLeft.WithShift, Command.LeftExtend);
         KeyBindings.Add (Key.CursorLeft.WithShift, Command.LeftExtend);
         KeyBindings.Add (Key.CursorUp.WithShift, Command.LeftExtend);
         KeyBindings.Add (Key.CursorUp.WithShift, Command.LeftExtend);
@@ -408,7 +408,7 @@ public class TextField : View
         ContextMenu = new ContextMenu { Host = this };
         ContextMenu = new ContextMenu { Host = this };
         ContextMenu.KeyChanged += ContextMenu_KeyChanged;
         ContextMenu.KeyChanged += ContextMenu_KeyChanged;
 
 
-        KeyBindings.Add (ContextMenu.Key, KeyBindingScope.HotKey, Command.ShowContextMenu);
+        KeyBindings.Add (ContextMenu.Key, KeyBindingScope.HotKey, Command.Context);
         KeyBindings.Add (Key.Enter, Command.Accept);
         KeyBindings.Add (Key.Enter, Command.Accept);
     }
     }
 
 

+ 2 - 2
Terminal.Gui/Views/TextValidateField.cs

@@ -401,7 +401,7 @@ namespace Terminal.Gui
 
 
             // Things this view knows how to do
             // Things this view knows how to do
             AddCommand (
             AddCommand (
-                        Command.LeftHome,
+                        Command.LeftStart,
                         () =>
                         () =>
                         {
                         {
                             HomeKeyHandler ();
                             HomeKeyHandler ();
@@ -461,7 +461,7 @@ namespace Terminal.Gui
                        );
                        );
 
 
             // Default keybindings for this view
             // Default keybindings for this view
-            KeyBindings.Add (Key.Home, Command.LeftHome);
+            KeyBindings.Add (Key.Home, Command.LeftStart);
             KeyBindings.Add (Key.End, Command.RightEnd);
             KeyBindings.Add (Key.End, Command.RightEnd);
 
 
             KeyBindings.Add (Key.Delete, Command.DeleteCharRight);
             KeyBindings.Add (Key.Delete, Command.DeleteCharRight);

+ 41 - 41
Terminal.Gui/Views/TextView.cs

@@ -2050,10 +2050,10 @@ public class TextView : View
                     }
                     }
                    );
                    );
 
 
-        AddCommand (Command.LineDown, () => ProcessMoveDown ());
+        AddCommand (Command.Down, () => ProcessMoveDown ());
 
 
         AddCommand (
         AddCommand (
-                    Command.LineDownExtend,
+                    Command.DownExtend,
                     () =>
                     () =>
                     {
                     {
                         ProcessMoveDownExtend ();
                         ProcessMoveDownExtend ();
@@ -2062,10 +2062,10 @@ public class TextView : View
                     }
                     }
                    );
                    );
 
 
-        AddCommand (Command.LineUp, () => ProcessMoveUp ());
+        AddCommand (Command.Up, () => ProcessMoveUp ());
 
 
         AddCommand (
         AddCommand (
-                    Command.LineUpExtend,
+                    Command.UpExtend,
                     () =>
                     () =>
                     {
                     {
                         ProcessMoveUpExtend ();
                         ProcessMoveUpExtend ();
@@ -2107,20 +2107,20 @@ public class TextView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.StartOfLine,
+                    Command.LeftStart,
                     () =>
                     () =>
                     {
                     {
-                        ProcessMoveStartOfLine ();
+                        ProcessMoveLeftStart ();
 
 
                         return true;
                         return true;
                     }
                     }
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.StartOfLineExtend,
+                    Command.LeftStartExtend,
                     () =>
                     () =>
                     {
                     {
-                        ProcessMoveStartOfLineExtend ();
+                        ProcessMoveLeftStartExtend ();
 
 
                         return true;
                         return true;
                     }
                     }
@@ -2137,7 +2137,7 @@ public class TextView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.EndOfLine,
+                    Command.RightEnd,
                     () =>
                     () =>
                     {
                     {
                         ProcessMoveEndOfLine ();
                         ProcessMoveEndOfLine ();
@@ -2147,10 +2147,10 @@ public class TextView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.EndOfLineExtend,
+                    Command.RightEndExtend,
                     () =>
                     () =>
                     {
                     {
-                        ProcessMoveEndOfLineExtend ();
+                        ProcessMoveRightEndExtend ();
 
 
                         return true;
                         return true;
                     }
                     }
@@ -2170,7 +2170,7 @@ public class TextView : View
                     Command.CutToStartLine,
                     Command.CutToStartLine,
                     () =>
                     () =>
                     {
                     {
-                        KillToStartOfLine ();
+                        KillToLeftStart ();
 
 
                         return true;
                         return true;
                     }
                     }
@@ -2278,7 +2278,7 @@ public class TextView : View
         AddCommand (Command.NewLine, () => ProcessReturn ());
         AddCommand (Command.NewLine, () => ProcessReturn ());
 
 
         AddCommand (
         AddCommand (
-                    Command.BottomEnd,
+                    Command.End,
                     () =>
                     () =>
                     {
                     {
                         MoveBottomEnd ();
                         MoveBottomEnd ();
@@ -2288,7 +2288,7 @@ public class TextView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.BottomEndExtend,
+                    Command.EndExtend,
                     () =>
                     () =>
                     {
                     {
                         MoveBottomEndExtend ();
                         MoveBottomEndExtend ();
@@ -2298,7 +2298,7 @@ public class TextView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.TopHome,
+                    Command.Start,
                     () =>
                     () =>
                     {
                     {
                         MoveTopHome ();
                         MoveTopHome ();
@@ -2308,7 +2308,7 @@ public class TextView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.TopHomeExtend,
+                    Command.StartExtend,
                     () =>
                     () =>
                     {
                     {
                         MoveTopHomeExtend ();
                         MoveTopHomeExtend ();
@@ -2390,7 +2390,7 @@ public class TextView : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.ShowContextMenu,
+                    Command.Context,
                     () =>
                     () =>
                     {
                     {
                         ContextMenu!.Position = new (
                         ContextMenu!.Position = new (
@@ -2414,15 +2414,15 @@ public class TextView : View
 
 
         KeyBindings.Add (Key.PageUp.WithShift, Command.PageUpExtend);
         KeyBindings.Add (Key.PageUp.WithShift, Command.PageUpExtend);
 
 
-        KeyBindings.Add (Key.N.WithCtrl, Command.LineDown);
-        KeyBindings.Add (Key.CursorDown, Command.LineDown);
+        KeyBindings.Add (Key.N.WithCtrl, Command.Down);
+        KeyBindings.Add (Key.CursorDown, Command.Down);
 
 
-        KeyBindings.Add (Key.CursorDown.WithShift, Command.LineDownExtend);
+        KeyBindings.Add (Key.CursorDown.WithShift, Command.DownExtend);
 
 
-        KeyBindings.Add (Key.P.WithCtrl, Command.LineUp);
-        KeyBindings.Add (Key.CursorUp, Command.LineUp);
+        KeyBindings.Add (Key.P.WithCtrl, Command.Up);
+        KeyBindings.Add (Key.CursorUp, Command.Up);
 
 
-        KeyBindings.Add (Key.CursorUp.WithShift, Command.LineUpExtend);
+        KeyBindings.Add (Key.CursorUp.WithShift, Command.UpExtend);
 
 
         KeyBindings.Add (Key.F.WithCtrl, Command.Right);
         KeyBindings.Add (Key.F.WithCtrl, Command.Right);
         KeyBindings.Add (Key.CursorRight, Command.Right);
         KeyBindings.Add (Key.CursorRight, Command.Right);
@@ -2436,18 +2436,18 @@ public class TextView : View
 
 
         KeyBindings.Add (Key.Backspace, Command.DeleteCharLeft);
         KeyBindings.Add (Key.Backspace, Command.DeleteCharLeft);
 
 
-        KeyBindings.Add (Key.Home, Command.StartOfLine);
-        KeyBindings.Add (Key.A.WithCtrl, Command.StartOfLine);
+        KeyBindings.Add (Key.Home, Command.LeftStart);
+        KeyBindings.Add (Key.A.WithCtrl, Command.LeftStart);
 
 
-        KeyBindings.Add (Key.Home.WithShift, Command.StartOfLineExtend);
+        KeyBindings.Add (Key.Home.WithShift, Command.LeftStartExtend);
 
 
         KeyBindings.Add (Key.Delete, Command.DeleteCharRight);
         KeyBindings.Add (Key.Delete, Command.DeleteCharRight);
         KeyBindings.Add (Key.D.WithCtrl, Command.DeleteCharRight);
         KeyBindings.Add (Key.D.WithCtrl, Command.DeleteCharRight);
 
 
-        KeyBindings.Add (Key.End, Command.EndOfLine);
-        KeyBindings.Add (Key.E.WithCtrl, Command.EndOfLine);
+        KeyBindings.Add (Key.End, Command.RightEnd);
+        KeyBindings.Add (Key.E.WithCtrl, Command.RightEnd);
 
 
-        KeyBindings.Add (Key.End.WithShift, Command.EndOfLineExtend);
+        KeyBindings.Add (Key.End.WithShift, Command.RightEndExtend);
 
 
         KeyBindings.Add (Key.K.WithCtrl, Command.CutToEndLine); // kill-to-end
         KeyBindings.Add (Key.K.WithCtrl, Command.CutToEndLine); // kill-to-end
 
 
@@ -2481,10 +2481,10 @@ public class TextView : View
 
 
         // BUGBUG: If AllowsReturn is false, Key.Enter should not be bound (so that Toplevel can cause Command.Accept).
         // BUGBUG: If AllowsReturn is false, Key.Enter should not be bound (so that Toplevel can cause Command.Accept).
         KeyBindings.Add (Key.Enter, Command.NewLine);
         KeyBindings.Add (Key.Enter, Command.NewLine);
-        KeyBindings.Add (Key.End.WithCtrl, Command.BottomEnd);
-        KeyBindings.Add (Key.End.WithCtrl.WithShift, Command.BottomEndExtend);
-        KeyBindings.Add (Key.Home.WithCtrl, Command.TopHome);
-        KeyBindings.Add (Key.Home.WithCtrl.WithShift, Command.TopHomeExtend);
+        KeyBindings.Add (Key.End.WithCtrl, Command.End);
+        KeyBindings.Add (Key.End.WithCtrl.WithShift, Command.EndExtend);
+        KeyBindings.Add (Key.Home.WithCtrl, Command.Start);
+        KeyBindings.Add (Key.Home.WithCtrl.WithShift, Command.StartExtend);
         KeyBindings.Add (Key.T.WithCtrl, Command.SelectAll);
         KeyBindings.Add (Key.T.WithCtrl, Command.SelectAll);
         KeyBindings.Add (Key.InsertChar, Command.ToggleOverwrite);
         KeyBindings.Add (Key.InsertChar, Command.ToggleOverwrite);
         KeyBindings.Add (Key.Tab, Command.Tab);
         KeyBindings.Add (Key.Tab, Command.Tab);
@@ -2501,7 +2501,7 @@ public class TextView : View
         ContextMenu = new ();
         ContextMenu = new ();
         ContextMenu.KeyChanged += ContextMenu_KeyChanged!;
         ContextMenu.KeyChanged += ContextMenu_KeyChanged!;
 
 
-        KeyBindings.Add ((KeyCode)ContextMenu.Key, KeyBindingScope.HotKey, Command.ShowContextMenu);
+        KeyBindings.Add ((KeyCode)ContextMenu.Key, KeyBindingScope.HotKey, Command.Context);
     }
     }
 
 
     private void TextView_Added1 (object? sender, SuperViewChangedEventArgs e)
     private void TextView_Added1 (object? sender, SuperViewChangedEventArgs e)
@@ -5019,7 +5019,7 @@ public class TextView : View
         DoNeededAction ();
         DoNeededAction ();
     }
     }
 
 
-    private void KillToStartOfLine ()
+    private void KillToLeftStart ()
     {
     {
         if (_isReadOnly)
         if (_isReadOnly)
         {
         {
@@ -5456,7 +5456,7 @@ public class TextView : View
         return true;
         return true;
     }
     }
 
 
-    private void MoveStartOfLine ()
+    private void MoveLeftStart ()
     {
     {
         if (_leftColumn > 0)
         if (_leftColumn > 0)
         {
         {
@@ -5847,7 +5847,7 @@ public class TextView : View
         MoveEndOfLine ();
         MoveEndOfLine ();
     }
     }
 
 
-    private void ProcessMoveEndOfLineExtend ()
+    private void ProcessMoveRightEndExtend ()
     {
     {
         ResetAllTrack ();
         ResetAllTrack ();
         StartSelecting ();
         StartSelecting ();
@@ -5914,7 +5914,7 @@ public class TextView : View
         MoveRight ();
         MoveRight ();
     }
     }
 
 
-    private void ProcessMoveStartOfLine ()
+    private void ProcessMoveLeftStart ()
     {
     {
         ResetAllTrack ();
         ResetAllTrack ();
 
 
@@ -5923,14 +5923,14 @@ public class TextView : View
             StopSelecting ();
             StopSelecting ();
         }
         }
 
 
-        MoveStartOfLine ();
+        MoveLeftStart ();
     }
     }
 
 
-    private void ProcessMoveStartOfLineExtend ()
+    private void ProcessMoveLeftStartExtend ()
     {
     {
         ResetAllTrack ();
         ResetAllTrack ();
         StartSelecting ();
         StartSelecting ();
-        MoveStartOfLine ();
+        MoveLeftStart ();
     }
     }
 
 
     private bool ProcessMoveUp ()
     private bool ProcessMoveUp ()

+ 4 - 4
Terminal.Gui/Views/TileView.cs

@@ -887,14 +887,14 @@ public class TileView : View
 
 
             AddCommand (Command.Left, () => { return MoveSplitter (-1, 0); });
             AddCommand (Command.Left, () => { return MoveSplitter (-1, 0); });
 
 
-            AddCommand (Command.LineUp, () => { return MoveSplitter (0, -1); });
+            AddCommand (Command.Up, () => { return MoveSplitter (0, -1); });
 
 
-            AddCommand (Command.LineDown, () => { return MoveSplitter (0, 1); });
+            AddCommand (Command.Down, () => { return MoveSplitter (0, 1); });
 
 
             KeyBindings.Add (Key.CursorRight, Command.Right);
             KeyBindings.Add (Key.CursorRight, Command.Right);
             KeyBindings.Add (Key.CursorLeft, Command.Left);
             KeyBindings.Add (Key.CursorLeft, Command.Left);
-            KeyBindings.Add (Key.CursorUp, Command.LineUp);
-            KeyBindings.Add (Key.CursorDown, Command.LineDown);
+            KeyBindings.Add (Key.CursorUp, Command.Up);
+            KeyBindings.Add (Key.CursorDown, Command.Down);
         }
         }
 
 
         public int Idx { get; }
         public int Idx { get; }

+ 3 - 3
Terminal.Gui/Views/TimeField.cs

@@ -53,7 +53,7 @@ public class TimeField : TextField
                         return true;
                         return true;
                     }
                     }
                    );
                    );
-        AddCommand (Command.LeftHome, () => MoveHome ());
+        AddCommand (Command.LeftStart, () => MoveHome ());
         AddCommand (Command.Left, () => MoveLeft ());
         AddCommand (Command.Left, () => MoveLeft ());
         AddCommand (Command.RightEnd, () => MoveEnd ());
         AddCommand (Command.RightEnd, () => MoveEnd ());
         AddCommand (Command.Right, () => MoveRight ());
         AddCommand (Command.Right, () => MoveRight ());
@@ -64,8 +64,8 @@ public class TimeField : TextField
 
 
         KeyBindings.ReplaceCommands (Key.Backspace, Command.DeleteCharLeft);
         KeyBindings.ReplaceCommands (Key.Backspace, Command.DeleteCharLeft);
 
 
-        KeyBindings.ReplaceCommands (Key.Home, Command.LeftHome);
-        KeyBindings.ReplaceCommands (Key.A.WithCtrl, Command.LeftHome);
+        KeyBindings.ReplaceCommands (Key.Home, Command.LeftStart);
+        KeyBindings.ReplaceCommands (Key.A.WithCtrl, Command.LeftStart);
 
 
         KeyBindings.ReplaceCommands (Key.CursorLeft, Command.Left);
         KeyBindings.ReplaceCommands (Key.CursorLeft, Command.Left);
         KeyBindings.ReplaceCommands (Key.B.WithCtrl, Command.Left);
         KeyBindings.ReplaceCommands (Key.B.WithCtrl, Command.Left);

+ 12 - 12
Terminal.Gui/Views/TreeView/TreeView.cs

@@ -163,7 +163,7 @@ public class TreeView<T> : View, ITreeView where T : class
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.LineUp,
+                    Command.Up,
                     () =>
                     () =>
                     {
                     {
                         AdjustSelection (-1);
                         AdjustSelection (-1);
@@ -173,7 +173,7 @@ public class TreeView<T> : View, ITreeView where T : class
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.LineUpExtend,
+                    Command.UpExtend,
                     () =>
                     () =>
                     {
                     {
                         AdjustSelection (-1, true);
                         AdjustSelection (-1, true);
@@ -193,7 +193,7 @@ public class TreeView<T> : View, ITreeView where T : class
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.LineDown,
+                    Command.Down,
                     () =>
                     () =>
                     {
                     {
                         AdjustSelection (1);
                         AdjustSelection (1);
@@ -203,7 +203,7 @@ public class TreeView<T> : View, ITreeView where T : class
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.LineDownExtend,
+                    Command.DownExtend,
                     () =>
                     () =>
                     {
                     {
                         AdjustSelection (1, true);
                         AdjustSelection (1, true);
@@ -223,7 +223,7 @@ public class TreeView<T> : View, ITreeView where T : class
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.TopHome,
+                    Command.Start,
                     () =>
                     () =>
                     {
                     {
                         GoToFirst ();
                         GoToFirst ();
@@ -233,7 +233,7 @@ public class TreeView<T> : View, ITreeView where T : class
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.BottomEnd,
+                    Command.End,
                     () =>
                     () =>
                     {
                     {
                         GoToEnd ();
                         GoToEnd ();
@@ -285,16 +285,16 @@ public class TreeView<T> : View, ITreeView where T : class
         KeyBindings.Add (Key.CursorLeft, Command.Collapse);
         KeyBindings.Add (Key.CursorLeft, Command.Collapse);
         KeyBindings.Add (Key.CursorLeft.WithCtrl, Command.CollapseAll);
         KeyBindings.Add (Key.CursorLeft.WithCtrl, Command.CollapseAll);
 
 
-        KeyBindings.Add (Key.CursorUp, Command.LineUp);
-        KeyBindings.Add (Key.CursorUp.WithShift, Command.LineUpExtend);
+        KeyBindings.Add (Key.CursorUp, Command.Up);
+        KeyBindings.Add (Key.CursorUp.WithShift, Command.UpExtend);
         KeyBindings.Add (Key.CursorUp.WithCtrl, Command.LineUpToFirstBranch);
         KeyBindings.Add (Key.CursorUp.WithCtrl, Command.LineUpToFirstBranch);
 
 
-        KeyBindings.Add (Key.CursorDown, Command.LineDown);
-        KeyBindings.Add (Key.CursorDown.WithShift, Command.LineDownExtend);
+        KeyBindings.Add (Key.CursorDown, Command.Down);
+        KeyBindings.Add (Key.CursorDown.WithShift, Command.DownExtend);
         KeyBindings.Add (Key.CursorDown.WithCtrl, Command.LineDownToLastBranch);
         KeyBindings.Add (Key.CursorDown.WithCtrl, Command.LineDownToLastBranch);
 
 
-        KeyBindings.Add (Key.Home, Command.TopHome);
-        KeyBindings.Add (Key.End, Command.BottomEnd);
+        KeyBindings.Add (Key.Home, Command.Start);
+        KeyBindings.Add (Key.End, Command.End);
         KeyBindings.Add (Key.A.WithCtrl, Command.SelectAll);
         KeyBindings.Add (Key.A.WithCtrl, Command.SelectAll);
         KeyBindings.Add (ObjectActivationKey, Command.Select);
         KeyBindings.Add (ObjectActivationKey, Command.Select);
     }
     }

+ 4 - 4
UICatalog/Scenarios/CharacterMap.cs

@@ -419,7 +419,7 @@ internal class CharMap : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.TopHome,
+                    Command.Start,
                     () =>
                     () =>
                     {
                     {
                         SelectedCodePoint = 0;
                         SelectedCodePoint = 0;
@@ -429,7 +429,7 @@ internal class CharMap : View
                    );
                    );
 
 
         AddCommand (
         AddCommand (
-                    Command.BottomEnd,
+                    Command.End,
                     () =>
                     () =>
                     {
                     {
                         SelectedCodePoint = MaxCodePoint;
                         SelectedCodePoint = MaxCodePoint;
@@ -456,8 +456,8 @@ internal class CharMap : View
         KeyBindings.Add (Key.CursorRight, Command.ScrollRight);
         KeyBindings.Add (Key.CursorRight, Command.ScrollRight);
         KeyBindings.Add (Key.PageUp, Command.PageUp);
         KeyBindings.Add (Key.PageUp, Command.PageUp);
         KeyBindings.Add (Key.PageDown, Command.PageDown);
         KeyBindings.Add (Key.PageDown, Command.PageDown);
-        KeyBindings.Add (Key.Home, Command.TopHome);
-        KeyBindings.Add (Key.End, Command.BottomEnd);
+        KeyBindings.Add (Key.Home, Command.Start);
+        KeyBindings.Add (Key.End, Command.End);
 
 
         MouseClick += Handle_MouseClick;
         MouseClick += Handle_MouseClick;
         MouseEvent += Handle_MouseEvent;
         MouseEvent += Handle_MouseEvent;

+ 2 - 2
UICatalog/Scenarios/ExpanderButton.cs

@@ -39,8 +39,8 @@ public class ExpanderButton : Button
         ShadowStyle = ShadowStyle.None;
         ShadowStyle = ShadowStyle.None;
 
 
         AddCommand (Command.HotKey, Toggle);
         AddCommand (Command.HotKey, Toggle);
-        AddCommand (Command.ToggleExpandCollapse, Toggle);
-        KeyBindings.Add (Key.F4, Command.ToggleExpandCollapse);
+        AddCommand (Command.Toggle, Toggle);
+        KeyBindings.Add (Key.F4, Command.Toggle);
 
 
         Orientation = Orientation.Vertical;
         Orientation = Orientation.Vertical;
 
 

+ 2 - 2
UICatalog/Scenarios/KeyBindings.cs

@@ -190,12 +190,12 @@ public class KeyBindingsDemo : View
         KeyBindings.Add (Key.F3, Command.New); // same as specifying KeyBindingScope.Focused
         KeyBindings.Add (Key.F3, Command.New); // same as specifying KeyBindingScope.Focused
         Application.KeyBindings.Add (Key.F4, this, Command.New);
         Application.KeyBindings.Add (Key.F4, this, Command.New);
 
 
-        AddCommand (Command.QuitToplevel, ctx =>
+        AddCommand (Command.Quit, ctx =>
                                          {
                                          {
                                              MessageBox.Query ($"{ctx.KeyBinding?.Scope}", $"Key: {ctx.Key}\nCommand: {ctx.Command}", buttons: "Ok");
                                              MessageBox.Query ($"{ctx.KeyBinding?.Scope}", $"Key: {ctx.Key}\nCommand: {ctx.Command}", buttons: "Ok");
                                              Application.RequestStop ();
                                              Application.RequestStop ();
                                              return true;
                                              return true;
                                          });
                                          });
-        Application.KeyBindings.Add (Key.Q.WithAlt, this, Command.QuitToplevel);
+        Application.KeyBindings.Add (Key.Q.WithAlt, this, Command.Quit);
     }
     }
 }
 }

+ 2 - 2
UICatalog/UICatalog.cs

@@ -664,9 +664,9 @@ public class UICatalogApp
 
 
             // TableView typically is a grid where nav keys are biased for moving left/right.
             // TableView typically is a grid where nav keys are biased for moving left/right.
             ScenarioList.KeyBindings.Remove (Key.Home);
             ScenarioList.KeyBindings.Remove (Key.Home);
-            ScenarioList.KeyBindings.Add (Key.Home, Command.TopHome);
+            ScenarioList.KeyBindings.Add (Key.Home, Command.Start);
             ScenarioList.KeyBindings.Remove (Key.End);
             ScenarioList.KeyBindings.Remove (Key.End);
-            ScenarioList.KeyBindings.Add (Key.End, Command.BottomEnd);
+            ScenarioList.KeyBindings.Add (Key.End, Command.End);
 
 
             // Ideally, TableView.MultiSelect = false would turn off any keybindings for
             // Ideally, TableView.MultiSelect = false would turn off any keybindings for
             // multi-select options. But it currently does not. UI Catalog uses Ctrl-A for
             // multi-select options. But it currently does not. UI Catalog uses Ctrl-A for

+ 2 - 2
UnitTests/Input/KeyBindingTests.cs

@@ -165,7 +165,7 @@ public class KeyBindingTests
         Command [] commands1 = { Command.Right, Command.Left };
         Command [] commands1 = { Command.Right, Command.Left };
         keyBindings.Add (Key.A, KeyBindingScope.Application, commands1);
         keyBindings.Add (Key.A, KeyBindingScope.Application, commands1);
 
 
-        Command [] commands2 = { Command.LineUp, Command.LineDown };
+        Command [] commands2 = { Command.Up, Command.Down };
         keyBindings.Add (Key.B, KeyBindingScope.Application, commands2);
         keyBindings.Add (Key.B, KeyBindingScope.Application, commands2);
 
 
         Key key = keyBindings.GetKeyFromCommands (commands1);
         Key key = keyBindings.GetKeyFromCommands (commands1);
@@ -175,7 +175,7 @@ public class KeyBindingTests
         Assert.Equal (Key.B, key);
         Assert.Equal (Key.B, key);
 
 
         // Negative case
         // Negative case
-        Assert.Throws<InvalidOperationException> (() => key = keyBindings.GetKeyFromCommands (Command.EndOfLine));
+        Assert.Throws<InvalidOperationException> (() => key = keyBindings.GetKeyFromCommands (Command.RightEnd));
     }
     }
 
 
     [Fact]
     [Fact]

+ 2 - 2
UnitTests/Views/ListViewTests.cs

@@ -504,7 +504,7 @@ Item 6",
         Assert.Equal (-1, lv.SelectedItem);
         Assert.Equal (-1, lv.SelectedItem);
 
 
         // bind shift down to move down twice in control
         // bind shift down to move down twice in control
-        lv.KeyBindings.Add (Key.CursorDown.WithShift, Command.LineDown, Command.LineDown);
+        lv.KeyBindings.Add (Key.CursorDown.WithShift, Command.Down, Command.Down);
 
 
         Key ev = Key.CursorDown.WithShift;
         Key ev = Key.CursorDown.WithShift;
 
 
@@ -536,7 +536,7 @@ Item 6",
         Assert.False (lv.Source.IsMarked (1));
         Assert.False (lv.Source.IsMarked (1));
         Assert.False (lv.Source.IsMarked (2));
         Assert.False (lv.Source.IsMarked (2));
 
 
-        lv.KeyBindings.Add (Key.Space.WithShift, Command.Select, Command.LineDown);
+        lv.KeyBindings.Add (Key.Space.WithShift, Command.Select, Command.Down);
 
 
         Key ev = Key.Space.WithShift;
         Key ev = Key.Space.WithShift;
 
 

+ 1 - 1
UnitTests/Views/TextViewTests.cs

@@ -1796,7 +1796,7 @@ This is the second line.
 
 
     [Fact]
     [Fact]
     [AutoInitShutdown]
     [AutoInitShutdown]
-    public void HistoryText_Undo_Redo_KillToStartOfLine ()
+    public void HistoryText_Undo_Redo_KillToLeftStart ()
     {
     {
         var text = "First line.\nSecond line.";
         var text = "First line.\nSecond line.";
         var tv = new TextView { Text = text };
         var tv = new TextView { Text = text };