microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 24 forks source link

JD Brain RP2040 HID VolumeDown and VolumeUp #1316

Open smfox10 opened 1 year ago

smfox10 commented 1 year ago

I can see in the simulator that VolumeDown has been triggered(The letters on the keyboard trigger properly), but the system is not responding. I am using a Win10 computer.

import { pins, board } from "@dsboard/msr124"
import { startHidKeyboard} from "@devicescript/servers"
import { Button } from "@devicescript/core"

import * as ds from "@devicescript/core"

const button = new Button()

const keyboard = startHidKeyboard({
})

button.down.subscribe(async ()=>{
    const selector=ds.HidKeyboardSelector.VolumeDown
    const modifier = ds.HidKeyboardModifiers.None
    const action = ds.HidKeyboardAction.Press

    await keyboard.key(selector,modifier,action)

})

image

pelikhan commented 1 year ago

This is most likely a HID firmware issue on the brain. The keyboard needs to be declared as a "media" keyboard so that windows accepts the volume keys.

mmoskal commented 10 months ago

it looks like it's a separate HID device that needs to be added, see https://github.com/hathach/tinyusb/pull/622