Beispiel #1
0
		private void Keyboard_KeyDown(object sender, RawKeyEventArgs args)
		{
			if (_isReading)
			{
				_readBuffer += args.Character;
				switch (args.Key)
				{
					case Key.Enter:
						WriteLine();
						break;
					case Key.Back:
						if (_readBuffer.Length > 0)
						{
							_readBuffer = _readBuffer.Substring(0, _readBuffer.Length - 1);
							_cursorColumn--;
							Write(' ');
							_cursorColumn--;
						}
						break;
					default:
						Write(args.Character);
						break;
				}
			}
		}
Beispiel #2
0
		private void Keyboard_KeyUp(object sender, RawKeyEventArgs args)
		{
		}