The micro:bit can transmit serial data via USB, radio and bluetooth. However, the DAPLink firmware loaded into the USB interface processor only supports mass storage class, communications device class, and HID for debug use. 

There is no specific package or program to control a PC or simulate a keyboard/mouse with the micro:bit, but there are several projects that make use of third-party software and hardware that can enable this function

  1. Bluetooth MIDI package (currently micro:bit V1 only) allows you to map micro:bit gestures to MIDI events, often used in music.
  2. Bluetooth HID This MakeCode extension allows the micro:bit V2 to be Bluetooth Human Interface Devices (HID). It currently supports services for Keyboard, Mouse, Media Keys (play, pause, volume up, etc.), a Gamepad, and an Absolute Mouse (puts the mouse at a specific position on the screen).
  3. Python serial PC control to control your keyboard or mouse via serial messages
  4. micro:bit + Spotify allows you to control your Spotify playlist
  5. The Bitio library for micropython allows yo to interact directly with the micro:bit and control programs like Minecraft
  6. WebUSB allows you to interact with the browser using the micro:bit, for example displaying serial data 
  7. This Instructables project uses Bluetooth to control the location of the cursor.