microsoft / microsoft/pxt-maker

HID extensions doesn't work as expected.

Open
#312 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
130
Forks
90
Avg merge
1d 14h
Merged PRs (30d)
1

Description

Describe the bug
Code with HID based extensions i.e. keyboard, mouse, gamepad doesn't work unless I add a pause in on start block.

To Reproduce
Steps to reproduce the behavior:

  1. Goto maker.makecode.com and create a new project.
  2. select any board with usb host supported like feather M0 express.
  3. add any of the HID extensions i.e. keyboard, mouse, gamepad.
  4. add a block from the extension to the on start or forever block.
  5. pair and upload the code to the board.

Expected behavior
OS should recognize the respective device and should function as expected.

Actual behaviour
OS doesn't recognize any device.

workaround
just add a pause of atlease 100ms on the on start block

potential fix
the board should wait for HID to initialize before starting the code.

Desktop (please complete the following information):

  • OS: Ubuntu 18.04 LTS
  • Browser Chrome
  • Version 81.0.4044.122 (Official Build) (64-bit)

Additional context
test code:
not working
working

Contributor guide

No contributing guide indexed for this repository

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 with the linked non-working and working MakeCode test projects, then trace how HID extensions initialize before the on-start code runs. Confirm the behavior on a USB-host-supported board and verify that keyboard, mouse, or gamepad devices are recognized without adding a pause.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.