micropython / micropython/micropython-lib

USB HID keyboard and mouse at the same time

Open
#921 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.9k
Forks
1.1k
Avg merge
7d 6h
Merged PRs (30d)
3

Description

Does anyone know how to create a USB device that acts as a mouse and keyboard at the same time? Examples here https://github.com/micropython/micropython-lib/tree/fbf7e120c6830d8d04097309e715bcab63dcca67/micropython/usb/examples/device are excellent, but I can only manage to work exclusively as a mouse or a keyboard, but not both at the same time.

As long as I understand, I need to prepare a report descriptor in a special way, but I'm not a HID expect and not sure how to do it. Please share if you have done it before ;)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the USB device examples under micropython/usb/examples/device and compare the mouse-only and keyboard-only approaches. Determine what report-descriptor change and device behavior are required for both functions to operate simultaneously; done means a single USB device can act as both a keyboard and mouse.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.