Displaying 1 result from an estimated 1 matches for "event_key".
Did you mean:
event_keys
2007 Sep 18
1
program to monitor USB keys
...any_keyboards = TRUE;
}
else
{
close(fd[i]);
fd[i] = -1;
}
}
}
if(any_keyboards == FALSE)
{
/* no keyboards found so sleep and try again */
sleep(10);
}
while(any_keyboards && done == FALSE)
{
int bytes_read;
struct input_event event_keys[64];
for(i = 0; i < MAX_KEY_WATCH; i++)
{
if(fd[i] >= 0)
{
bytes_read = read(fd[i], event_keys, sizeof(event_keys));
if(bytes_read > 0)
{
/* there is a down event */
/* there is a UP event */
/* there is a UP event */
//printf(&quo...