def send_hid_event(use_page, usage, down):
message = create(protobuf.SEND_HID_EVENT_MESSAGE)<EOL>event = message.inner()<EOL>abstime = binascii.unhexlify(b'<STR_LIT>')<EOL>data = use_page.to_bytes(<NUM_LIT:2>, byteorder='<STR_LIT>')<EOL>data += usage.to_bytes(<NUM_LIT:2>, byteorder='<STR_LIT>')<EOL>data += (<NUM_LIT:1> if down else <NUM_LIT:0>).to_bytes(<NUM_LIT:2>, byteorder='<STR_LIT>')<EOL>event.hidEventData = abstime +binascii.unhexlify(b'<STR_LIT>' +<EOL>b'<STR_LIT>') +data +binascii.unhexlify(b'<STR_LIT>')<EOL>return message<EOL>
Create a new SEND_HID_EVENT_MESSAGE.