hi, sometime modifier key state is not right.
Spice-Warning **: inputs_channel.c:442:inputs_channel_handle_parsed: YYYYYY 0 leds=0, modifiers=6
Spice-Warning **: inputs_channel.c:442:inputs_channel_handle_parsed: YYYYYY 1 leds=0, modifiers=6
Spice-Warning **: inputs_channel.c:442:inputs_channel_handle_parsed: YYYYYY 2 leds=0, modifiers=6
that is my modified code:inputs_channel.c
case SPICE_MSGC_INPUTS_KEY_MODIFIERS: {
SpiceMsgcKeyModifiers *modifiers = (SpiceMsgcKeyModifiers *)buf;
uint8_t leds;
int i = 0;
if (!keyboard) {
break;
}
p>
for(i=0; i<3; i++){
leds = kbd_get_leds(keyboard);
spice_warning("YYYYYY %d leds=%d, modifiers=%d", i, leds, modifiers->modifiers);
if (leds == modifiers->modifiers)
break;
if ((modifiers->modifiers & SPICE_KEYBOARD_MODIFIER_FLAGS_SCROLL_LOCK) !=
(leds & SPICE_KEYBOARD_MODIFIER_FLAGS_
SCROLL_LOCK)) {
kbd_push_scan(keyboard, SCROLL_LOCK_SCAN_CODE);
kbd_push_scan(keyboard, SCROLL_LOCK_SCAN_CODE | 0x80);
}
if ((modifiers->modifiers & SPICE_KEYBOARD_MODIFIER_FLAGS_NUM_LOCK) !=
(leds & SPICE_KEYBOARD_MODIFIER_FLAGS_NUM_LOCK)) {
kbd_push_scan(keyboard, NUM_LOCK_SCAN_CODE);
&nb
sp; kbd_push_scan(keyboard, NUM_LOCK_SCAN_CODE | 0x80);
}
if ((modifiers->modifiers & SPICE_KEYBOARD_MODIFIER_FLAGS_CAPS_LOCK) !=
(leds & SPICE_KEYBOARD_MODIFIER_FLAGS_CAPS_LOCK)) {
kbd_push_scan(keyboard, CAPS_LOCK_SCAN_CODE);
kbd_push_scan(keyboard, CAPS_LOCK_SCAN_CODE | 0x80);
&n
bsp; }
}
activate_modifiers_watch();
break;
}
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel