// Simulate that the key is being pressed down.
KeyboardAPI.SendKey(KeyboardAPI.DirectXKeyStrokes.DIK_F2, false, KeyboardAPI.InputType.Keyboard);
// Simulate that the key is not pressed anymore, therefore It was pressed.
KeyboardAPI.SendKey(KeyboardAPI.DirectXKeyStrokes.DIK_F2, true...