--- sourceforge.net/trunk/rdesktop/xkeymap.c 2002/09/01 12:03:33 111 +++ sourceforge.net/trunk/rdesktop/xkeymap.c 2002/09/11 07:39:53 113 @@ -393,9 +393,12 @@ static void update_modifier_state(uint16 modifiers, BOOL pressed) { +#ifdef WITH_DEBUG_KBD + uint16 old_modifier_state; + + old_modifier_state = remote_modifier_state; +#endif - DEBUG_KBD(("Before updating modifier_state:0x%x, pressed=0x%x\n", - remote_modifier_state, pressed)); switch (modifiers) { case SCANCODE_CHAR_LSHIFT: @@ -436,7 +439,15 @@ } break; } - DEBUG_KBD(("After updating modifier_state:0x%x\n", remote_modifier_state)); + +#ifdef WITH_DEBUG_KBD + if (old_modifier_state != remote_modifier_state) + { + DEBUG_KBD(("Before updating modifier_state:0x%x, pressed=0x%x\n", + old_modifier_state, pressed)); + DEBUG_KBD(("After updating modifier_state:0x%x\n", remote_modifier_state)); + } +#endif }