247 |
return tr; |
return tr; |
248 |
} |
} |
249 |
|
|
250 |
printf("No translation for (keysym 0x%lx, %s)\n", keysym, get_ksname(keysym)); |
fprintf(stderr, "No translation for (keysym 0x%lx, %s)\n", keysym, get_ksname(keysym)); |
251 |
|
|
252 |
/* not in keymap, try to interpret the raw scancode */ |
/* not in keymap, try to interpret the raw scancode */ |
253 |
if ((keycode >= min_keycode) && (keycode <= 0x60)) |
if ((keycode >= min_keycode) && (keycode <= 0x60)) |
254 |
{ |
{ |
255 |
tr.scancode = keycode - min_keycode; |
tr.scancode = keycode - min_keycode; |
256 |
printf("Sending guessed scancode 0x%x\n", tr.scancode); |
fprintf(stderr, "Sending guessed scancode 0x%x\n", tr.scancode); |
257 |
} |
} |
258 |
else |
else |
259 |
{ |
{ |
260 |
printf("No good guess for keycode 0x%x found\n", keycode); |
fprintf(stderr, "No good guess for keycode 0x%x found\n", keycode); |
261 |
} |
} |
262 |
|
|
263 |
return tr; |
return tr; |
393 |
static void |
static void |
394 |
update_modifier_state(uint16 modifiers, BOOL pressed) |
update_modifier_state(uint16 modifiers, BOOL pressed) |
395 |
{ |
{ |
396 |
|
#ifdef WITH_DEBUG_KBD |
397 |
|
uint16 old_modifier_state; |
398 |
|
|
399 |
|
old_modifier_state = remote_modifier_state; |
400 |
|
#endif |
401 |
|
|
|
DEBUG_KBD(("Before updating modifier_state:0x%x, pressed=0x%x\n", |
|
|
remote_modifier_state, pressed)); |
|
402 |
switch (modifiers) |
switch (modifiers) |
403 |
{ |
{ |
404 |
case SCANCODE_CHAR_LSHIFT: |
case SCANCODE_CHAR_LSHIFT: |
439 |
} |
} |
440 |
break; |
break; |
441 |
} |
} |
442 |
DEBUG_KBD(("After updating modifier_state:0x%x\n", remote_modifier_state)); |
|
443 |
|
#ifdef WITH_DEBUG_KBD |
444 |
|
if (old_modifier_state != remote_modifier_state) |
445 |
|
{ |
446 |
|
DEBUG_KBD(("Before updating modifier_state:0x%x, pressed=0x%x\n", |
447 |
|
old_modifier_state, pressed)); |
448 |
|
DEBUG_KBD(("After updating modifier_state:0x%x\n", remote_modifier_state)); |
449 |
|
} |
450 |
|
#endif |
451 |
|
|
452 |
} |
} |
453 |
|
|