I have not tried it myself,yet.[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sat Jan 18, 2025 11:15 am I haven't looked in detail into it, but afaik, you need two byte commands for that, so the USB device has to support it.
There seems to be a distinction in Windows between scan codes that are sent from the device and virtual key codes in the Windows system. Don‘t know whether USB.KEYPRESS adds the leading E0, but it should use the scan codes (I guess:-)
Scancodes
• Definition: Scancodes are hardware-specific codes sent by the keyboard to the computer when a key is pressed or released.
• Windows Key:
• Left Windows Key: `E0 5B` (make code), `E0 F0 5B` (break code).
• Right Windows Key: `E0 5C` (make code), `E0 F0 5C` (break code).
• Media Playback Keys (PS/2 Set 2 Scancodes):
• Play/Pause: `E0 22`
• Stop: `E0 24`
• Next Track: `E0 19`
• Previous Track: `E0 10`
• Volume Up: `E0 30`
• Volume Down: `E0 2E`
• Mute: `E0 20`.