Keyboard HandleInput Method Delta Engine Documentation

Namespace: DeltaEngine.Input
Assembly: DeltaEngine.Input (in DeltaEngine.Input.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public string HandleInput(
	string inputText
)

Return Value

Type: String
Remarks

Tests: DeltaEngine.Input.Tests.KeyboardTests
Examples

2 unit tests call DeltaEngine.Input.Keyboard.HandleInput(System.String)
[Test, CloseAfterFirstFrame]
public void HandleInput()
{
    if (mockKeyboard == null)
        return; //ncrunch: no coverage
    Assert.AreEqual("", keyboard.HandleInput(""));
    mockKeyboard.SetKeyboardState(Key.A, State.Pressing);
    mockKeyboard.SetKeyboardState(Key.Z, State.Pressing);
    Assert.AreEqual("az", keyboard.HandleInput(""));
    mockKeyboard.SetKeyboardState(Key.A, State.Pressing);
    mockKeyboard.SetKeyboardState(Key.Backspace, State.Pressing);
    Assert.AreEqual("", keyboard.HandleInput(""));
    mockKeyboard.SetKeyboardState(Key.Escape, State.Pressing);
    Assert.AreEqual("", keyboard.HandleInput(""));
    mockKeyboard.SetKeyboardState(Key.Space, State.Pressing);
    mockKeyboard.SetKeyboardState(Key.D9, State.Pressing);
    Assert.AreEqual(" 9", keyboard.HandleInput(""));
}
[Test]
public void HandleInputVisually()
{
    var text = new FontText(Font.Default, "Type some text", Rectangle.One);
    text.Start<ContinousInputHandler>();
}
See Also