CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Using ex_usb_kbmouse.c to send Windows Logo Right + L

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
gcataldo



Joined: 16 Aug 2005
Posts: 3

View user's profile Send private message

Using ex_usb_kbmouse.c to send Windows Logo Right + L
PostPosted: Tue Jan 30, 2007 9:10 am     Reply with quote

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;
}
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group