gcataldo
Joined: 16 Aug 2005 Posts: 3
|
Using ex_usb_kbmouse.c to send Windows Logo Right + L |
Posted: Tue Jan 30, 2007 9:10 am |
|
|
I want to use ex_usb_kbmouse.c to send Windows Logo Right + L as keyboard (This command lock the session in Windows) but I can�t find what usb scan codes I must use.
Could someone help me please?
I am using this function of the example.
/////////////////////////////////////////////////////////////////////////////
//
// usb_keyboard_task()
//
// Sends a packet of keyboard data. The protocol was specified in the HID
// report descriptor (see usb_desc_kbmouse.h), and is:
// tx_msg[0] = modifier (an 8bit bitmap of shift, tab, alt keypress)
// tx_msg[1] = const 0
// tx_msg[2:6] = an array of held down keys. a=4, b=5, etc.
// if msg[2:7]={0} then no keys are held down
//
// rx_msg[0] = 5bit bitmap of led status
//
/////////////////////////////////////////////////////////////////////////////
void usb_keyboard_task(void) {
static int8 tx_msg[7]={0,0,0,0,0,0,0};
//static int8 tx_msg2[7]={0,0,0,0,0,0,0};
static int8 leds;
if (!input(BUTTON))
{
tx_msg[0]=0b00000001;
tx_msg[2]=15;
//tx_msg2[2]=227;
}
else
{
tx_msg[0]=0b00000000;
tx_msg[2]=0;
//tx_msg2[2]=0;
} |
|