mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Cleans up key handling in drivers (was "fixes VkeyPacketSimulator is broken") (#3078)
* Fixes #3054. VkeyPacketSimulator scenario is broken. * Fix some key handle and unit tests. * Remove unnecessary conditional. * Improves key handling. * Also allow map capslock to shift with accented characters. * Change to MemberData. * Remove unnecessary using. * Fix merge errors. * Fixes #3095. WindowsDriver should return the mask keys to IsShift, IsAlt and IsCtrl return the right value. * Modifiers keys are valid to be handled on key down and key up. * Map KeyCode.Enter to ConsoleKey.Enter and vice versa. * Updated ScanCodeMapping table with readable constants * Documented bugs * Implemented mapping using MapVirtualKeyEx * Implemented mapping using MapVirtualKeyEx * Changed KeyCode special keys to match ConsoleKey values + max unicode codepoint * Fixed bogus CollectionNavigator impl and tests * Nuked DeleteChar. renamed InsertChar to Insert * KeyCode.Enter = ConsoleKey.Enter, not \n * Code cleanup * Added diag for keyboard layout name * Fixed AltGr support (hopefully) * Simplified code * Simplified KeyCode by removing ShiftKeys * Fixed TextView * Code cleanup * Fixes cursesdriver (somewhat) * Code cleanup * netdriver wip * Fixed netdriver under WSL * Turned off debug spew * Removed old code --------- Co-authored-by: Tig Kindel <tig@users.noreply.github.com> Co-authored-by: Tig Kindel <tig@kindel.com>
This commit is contained in:
@@ -45,7 +45,7 @@ namespace UICatalog.Scenarios {
|
||||
|
||||
private void TreeView_KeyPress (object sender, Key obj)
|
||||
{
|
||||
if (obj.KeyCode == KeyCode.DeleteChar) {
|
||||
if (obj.KeyCode == KeyCode.Delete) {
|
||||
|
||||
var toDelete = treeView.SelectedObject;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user