Browse Source

[Windows] Function keys on Legacy mode send UniChar == 0, handle this scenario, fixes issue #105, thanks to @fcallejon for the fix

miguel 7 years ago
parent
commit
f56f1ba39b
1 changed files with 1 additions and 3 deletions
  1. 1 3
      Terminal.Gui/Drivers/WindowsDriver.cs

+ 1 - 3
Terminal.Gui/Drivers/WindowsDriver.cs

@@ -510,10 +510,8 @@ namespace Terminal.Gui {
 			case WindowsConsole.EventType.Key:
 				if (inputEvent.KeyEvent.bKeyDown == false)
 					return;
-				if (inputEvent.KeyEvent.UnicodeChar == 0)
-					return;
 				var map = MapKey (ToConsoleKeyInfo (inputEvent.KeyEvent));
-				if (map == (Key)0xffffffff)
+				if (inputEvent.KeyEvent.UnicodeChar == 0 && map == (Key)0xffffffff)
 					return;
 				keyHandler (new KeyEvent (map));
 				break;