Bluebie / volume_knob

A little digispark volume knob for computers and tablets
Other
35 stars 6 forks source link

May not work for some systems #2

Open KDMcMullan opened 1 year ago

KDMcMullan commented 1 year ago

This doesn't necessarily work. I've modified the basic keyboard example to just send the "volume down" code alongside "A" every second. I see the As appearing on the screen, but the volume does not decrease.

It's explained on other forums (and in a convoluted way in the USB spec that the scancodes are purely for American keyboard mappings. That is to say, if you have a French keyboard driver installed and you press the Q button on your American keyboard, it will print the "A" character.

I have no doubt that the DigiSpark is sending the keyboard scan code 0x81, but the keyboard driver doesn't necessarily know what to do with that unless the computer has a driver installed which will perform some action when the code is sent.

In the cases where the project works, I suspect it's because the keyboard driver which is installed is coded to adjust the volume when it receives the appropriate scan code.