I know this is somewhat out of the realm of node-red but I figured I don't lose anything by asking.
I'm using node-red to send HID (keyboard/mouse) commands to a host device.
I used the project below to enable HID mode on a Pi Zero
Sending any of the keys inside the compiled program below works fine.
However, the program is missing a lot of characters so I went down the route of skipping the program and just sending bytes directly to the device.
To send "Hi" for I can use
Sending the keys for “Hi” looks like this:
# H (Right shift + h)
echo -ne "\x20\0\xb\0\0\0\0\0" > /dev/hidg0
# Release all keys
echo -ne "\0\0\0\0\0\0\0\0" > /dev/hidg0
# i
echo -ne "\0\0\xc\0\0\0\0\0" > /dev/hidg0
# Release all keys
echo -ne "\0\0\0\0\0\0\0\0" > /dev/hidg0
What I don't understand, is why some key usage IDs don't match what's listed in the USB spec (table on page 82)
For example:
the spec states to use 0B for h but I actually need to send xb or the character sent to the host device ends up being wrong