Keypad library with VirtualUSBKeyboard not working

I am busy with converting a Toshiba HD-EP10 to a media center. I am ripping out some internals and replace them with a micro-atx mainboard. Now I want to keep as much working a possible.

The button on the player are connected as a 2x2 matrix keypad. Now I want to connect them to a arduino and let the arduino simulated keys are keyboard presses with the VirtualUSBKeyboard library.

I first tested the VirtualUSBKeyboard library with a single button and that worked fine.

Than I tried to get the keypad working with the arduino. First without the VirtualUSBKeyboard, so just only with the Keypad Library. I got that working and got the right output on the serial output.

Now I trying to combine the two together, but the VirtualUSBKeyboard library uses the command TIMSK0&=!(1<<TOIE0);

Because of that command, the keypad library isn’t working and I cannot get the keypad to work. Does somebody has a work around for this ?

#include <Keypad.h>
#include "UsbKeyboard.h"

const byte rows = 2; //four rows
const byte cols = 2; //three columns
char keys[rows][cols] = {
  {'S','P'},
  {'U','D'}
};
byte rowPins[rows] = {6, 7}; 
byte colPins[cols] = {8, 9}; 
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, rows, cols );

// Use the on-board LED as an activity display
int ledPin = 13;

/**
 * Configure button inputs and set up the USB connection to the host
 */
void setup()
{
  // Set up the activity display LED
  pinMode (ledPin, OUTPUT);
  digitalWrite (ledPin, HIGH);

  // Disable timer0 since it can mess with the USB timing. Note that
  // this means some functions such as delay() will no longer work.
  TIMSK0&=!(1<<TOIE0);

  // Clear interrupts while performing time-critical operations
  cli();

  // Force re-enumeration so the host will detect us
  usbDeviceDisconnect();
  delayMs(250);
  usbDeviceConnect();

  // Set interrupts again
  sei();
}

void loop()
{
  UsbKeyboard.update();

  char key = keypad.getKey();

  if (key != NO_KEY){
    Serial.println(key);
    UsbKeyboard.sendKeyStroke(key);
    digitalWrite(ledPin, !digitalRead(ledPin)); // Toggle status LED
  }
  
}

/**
 * Define our own delay function so that we don't have to rely on
 * operation of timer0, the interrupt used by the internal delay()
 */
void delayMs(unsigned int ms)
{
  for (int i = 0; i < ms; i++) {
    delayMicroseconds(1000);
  }
}