# Kmod\_ctrl problem

**URL:** <https://discourse.libsdl.org/t/kmod-ctrl-problem/4957>\
**Category:** SDL Development\
**Created:** [August 24, 2001, 1:36am UTC](https://discourse.libsdl.org/t/kmod-ctrl-problem/4957 "2001-08-24T01:36:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anders\_Emil\_Hansen](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/a/2acd7d/32.png) [@Anders\_Emil\_Hansen](https://discourse.libsdl.org/u/Anders_Emil_Hansen)\
**Post date:** [August 24, 2001, 1:36am UTC](https://discourse.libsdl.org/t/kmod-ctrl-problem/4957/1 "2001-08-24T01:36:00Z")

</div>

Hi all,

I have a small problem when detecting if a user is dragging something with the mouse while holding down one of the ctrl keys…

It seems that when the user holds down the ctrl key while dragging, the “mousebuttonup” event is delayed by at least one second… ?! Strange isn’t it? 🙂

What is one to do?  
Best regards  
Anders

---

<div class="post-metadata">

**Author:** ![Randi\_J\_Relander](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/r/9d8465/32.png) [@Randi\_J\_Relander](https://discourse.libsdl.org/u/Randi_J_Relander)\
**Post date:** [August 24, 2001, 1:37pm UTC](https://discourse.libsdl.org/t/kmod-ctrl-problem/4957/2 "2001-08-24T13:37:00Z")

</div>

Anders Emil Hansen wrote:

> It seems that when the user holds down the ctrl key while  
> dragging, the “mousebuttonup” event is delayed by at least  
> one second… ?! Strange isn’t it? 🙂

Are you sure it isn’t a bunch of mousemove events getting backed up in the  
event queue while you are dragging? This is usually caused by the mousemove  
events coming in faster than your framerate. You might need to speed up your  
dragging (using dirty rectangles) or flush out the extra events on the fly  
to prevent them from building up.

- Randi

Regimental Command  
Generic Armored Combat System  
[http://regcom.sourceforge.net](http://regcom.sourceforge.net)
