diff --git a/gadget_enable.sh b/gadget_enable.sh index 907d4a7..2fb6105 100755 --- a/gadget_enable.sh +++ b/gadget_enable.sh @@ -5,6 +5,18 @@ gserial=$(awk '/Serial/ { print $3 }' /proc/cpuinfo) gmanufacturer="Petrkr.NET" gproduct="rPi KVM" +KEYBOARD="" +KEYBOARD="$KEYBOARD\\x05\\x01\\x09\\x06" # Usage generic desktop, Usage keyboard +KEYBOARD="$KEYBOARD\\xa1\\x01\\x05\\x07" # Collection App, Use page Keyboard +KEYBOARD="$KEYBOARD\\x19\\xe0\\x29\\xe7\\x15\\x00\\x25\\x01\\x75\\x01\\x95\\x08" # Usage min (LeftControl) max (Right GUI), log min 0 log min 1, report size 1 count 8 +KEYBOARD="$KEYBOARD\\x81\\x02" # Input data, variable, absolute +KEYBOARD="$KEYBOARD\\x75\\x08\\x95\\x01" # Report size 8, count 1 +KEYBOARD="$KEYBOARD\\x81\\x03" # Input Const, variable, absolute +KEYBOARD="$KEYBOARD\\x75\\x01\\x95\\x05" # Report size 1 count 5 +KEYBOARD="$KEYBOARD\\x05\\x08\\x19\\x01\\x29\\x05\\x91\\x02\\x95\\x01\\x75\\x03\\x91\\x03\\x95\\x06\\x75\\x08\\x15\\x00\\x25\\xff\\x05\\x07\\x19\\x00\\x29\\x65" +KEYBOARD="$KEYBOARD\\x81\\x00" # Input data array absolute +KEYBOARD="$KEYBOARD\\xc0" # End Collection Application + #Mouse absolute descriptor MOUSE0="" MOUSE0="$MOUSE0\\x05\\x01\\x09\\x02" # Usage generic desktop, Usage mouse @@ -52,7 +64,7 @@ mkdir -p functions/hid.kbd0 echo 1 > functions/hid.kbd0/protocol echo 1 > functions/hid.kbd0/subclass echo 8 > functions/hid.kbd0/report_length -echo -ne \\x05\\x01\\x09\\x06\\xa1\\x01\\x05\\x07\\x19\\xe0\\x29\\xe7\\x15\\x00\\x25\\x01\\x75\\x01\\x95\\x08\\x81\\x02\\x95\\x01\\x75\\x08\\x81\\x03\\x95\\x05\\x75\\x01\\x05\\x08\\x19\\x01\\x29\\x05\\x91\\x02\\x95\\x01\\x75\\x03\\x91\\x03\\x95\\x06\\x75\\x08\\x15\\x00\\x25\\xff\\x05\\x07\\x19\\x00\\x29\\x65\\x81\\x00\\xc0 > functions/hid.kbd0/report_desc +echo -ne $KEYBOARD > functions/hid.kbd0/report_desc echo " HID Mouse" mkdir -p functions/hid.mouse0