Example #1
0
    private void OnResetButtonPressed()
    {
        InputHelper.EraseActionEvents(_inputMapKey);
        var ev = InputHelper.GetDefaultInputEvent(_inputMapKey);

        InputMap.ActionAddEvent(_inputMapKey, ev);
        _lineEditNode.Text = InputHelper.GetKeyText(ev as InputEventKey);
    }
Example #2
0
 private void OnGuiInput(InputEvent ev)
 {
     if (ev is InputEventKey e)
     {
         InputHelper.EraseActionEvents(_inputMapKey);
         InputMap.ActionAddEvent(_inputMapKey, ev);
         _lineEditNode.Text = InputHelper.GetKeyText(e);
         AcceptEvent();
     }
 }