simconnect.MapInputEventToClientEvent error

I am trying to get a notification when a key is pressed in the sim. In this case the “a”. However, I keep getting an error message with the following code. Could someone help me out?

I am programming in C#. My simconnect works fine for sending / receiving events, variables, etc. but this is a new addition to my tool.

enum EVENTS 
{
    KEY_C_DN = 0,
    KEY_C_UP = 1,

};

enum GROUPID
{
    GROUP0 = 0,
}

enum INPUTID
{
    INPUT0 = 0,
}

and then after the simconnect connection is established:

simconnect.MapInputEventToClientEvent(
       INPUTID.INPUT0,
       "c",               // Virtuele keycode
       EVENTS.KEY_C_DN,    // Down event
       0,
       EVENTS.KEY_C_UP,      // Up event
       1,
       false
   );

Whenever this last function is called, I directly get an error:

Exception (on exception): dwException 1
Exception (on exception): dwSendID 2
Exception (on exception): dwIndex 4294967295
Exception (on exception): UNKNOWN_SENDID 0
Exception (on exception): UNKNOWN_INDEX 4294967295
Exception (on exception): dwSize 24
Exception (on exception): dwVersion 6
Exception (on exception): dwID 1