Moved Toplevel keybindings out of Toplevel to Application.

Still need to move navigation code out of Toplevel
This commit is contained in:
Tig
2024-07-24 12:28:30 -06:00
parent feaf5c0f6c
commit c03dd32031
36 changed files with 1035 additions and 870 deletions

View File

@@ -134,7 +134,7 @@ public class FileDialog : Dialog
FullRowSelect = true,
CollectionNavigator = new FileDialogCollectionNavigator (this)
};
_tableView.KeyBindings.Add (Key.Space, Command.Select);
_tableView.KeyBindings.ReplaceCommands (Key.Space, Command.Select);
_tableView.MouseClick += OnTableViewMouseClick;
_tableView.Style.InvertSelectedCellFirstCharacter = true;
Style.TableStyle = _tableView.Style;
@@ -254,10 +254,10 @@ public class FileDialog : Dialog
_tableView.KeyUp += (s, k) => k.Handled = TableView_KeyUp (k);
_tableView.SelectedCellChanged += TableView_SelectedCellChanged;
_tableView.KeyBindings.Add (Key.Home, Command.TopHome);
_tableView.KeyBindings.Add (Key.End, Command.BottomEnd);
_tableView.KeyBindings.Add (Key.Home.WithShift, Command.TopHomeExtend);
_tableView.KeyBindings.Add (Key.End.WithShift, Command.BottomEndExtend);
_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);
_treeView.KeyDown += (s, k) =>
{