private ButtonEventHandler KeyboardEventHandler(KeyboardKeyInput input, Keyboard keyboard)
 {
     return((statePressed, previousStatePressed) =>
     {
         if (statePressed && !previousStatePressed)
         {
             keyboard.Press(input); keyboard.ResetKeyDown();
         }
         else if (statePressed && previousStatePressed)
         {
             if (keyboard.KeyDown == keyboard.KeyDownDelay)
             {
                 keyboard.Press(input);
             }
             else
             {
                 keyboard.AddKeyDown();
             }
         }
         else if (!statePressed && previousStatePressed)
         {
             keyboard.Release(input); keyboard.ResetKeyDown();
         }
     });
 }