Questions tagged [mouseevent]

A general tag for user-interface events that are generated by the mouse. This includes pressing/releasing a button, clicking (including double/triple-clicks), moving, dragging, etc.

This tag deals with the events that are generated by preforming actions with a Computer Mouse and similar input devices which emulate the behaviour of a mouse (such as Touchpads and Graphic Tablets).

Mouse events are usually split into several categories:

  • Button Press (Button Down) event - The event where a previously unpressed mouse button just became pressed
  • Button Release (Button Release) event - The event where a previously pressed mouse button just became unpressed
  • Button Click event - A Button Press event followed by a Button Release event. In some platforms and locations, this concept has one or more of the following limitations:
    • The Press and Release both happend while the mouse was in the same place (the mouse wasn't moved between the press and the release). Sometimes there is a lighter version of this restriction, which only forces the mouse to be above the same "user interface element" on the press and release events.
    • The Press and Release both happend inside a limited (usually short) time interval.
  • Button Double (Triple/...) Click event - Two (Three/...) click events, one after another with the same mouse button. These may also have one or more of the limitations mentioned for a single click event
  • Button Move (Motion) event - An event where the mouse is moved. Usually this refers only to the case where none of the mouse buttons was pressed (for the case where one or more buttons was in fact pressed, see the next definition).
  • Button Drag event - An event where the mouse moves while one or more of the mouse buttons is held down
  • Button (Scroll) Wheel event - In modern mice, there is usually a wheel part called scroll-wheel, which can be moved (aka rolled, scrolled) up and down. Such a movement of that part is referred to as a Mouse Wheel event.
    • In some newer alternative input devices which also serve as a mouse, sometimes there won't be any physical whell. Instead, there may be hot-spot areas and/or buttons that will emulate the movement of the wheel. For example, in many touchpads, a movement in certain areas will be interpreted as scroll event.
    • Some mice (and other devices) allow scrolling not just up and down, but also in other directions (typically, left and right).

For more information and definitions, see the Computer Mouse and it's operation on Wikipedia.

6218 questions
2
votes
2 answers

Detecting Double Click with Gtk#

I'm using GTK# on monodevelop 3.0.4.6, on windows, I got a Gtk.EventBox connected to a ButtonPressEventHandler detecting single click (EventType.ButtonPress), but the double click (EventType.TwoButtonPress) is NEVER triggered, does anyone has any…
user1675393
  • 21
  • 1
  • 2
2
votes
0 answers

Last few rows of an image are not clickable with openCV 2.4

I am working on a photo measurement project in Visual Studio 2010 (C++) with openCV 2.4. What I need to do is to be able to click ANYWHERE on the photo and save the x and y coordinates of my mouse event. Seems simple. However, let's say, for…
2
votes
1 answer

Will XNA Mouse Event work with Single Touch on Windows 7 PC

I have a game developed for Windows 7 in XNA which uses the Mouse Event only! There are buttons around the screen that the user plays with. Will this same game work with Windows 7 Touch screens with a single touch? I do not need any multi-touch…
Omkar Khair
  • 1,364
  • 2
  • 17
  • 40
2
votes
1 answer

Jquery mouse event

I have no idea on how to fix seemingly a simple problem. If you hover over the album covers there fadesIn an ( i ) icon if you hover over the ( i ) icon there comes up an Tooltip but it doesn't stay up it fadesOut after 1,2sec. How could i fix this…
Pullapooh
  • 161
  • 1
  • 4
  • 14
2
votes
2 answers

AS3 - Button inside MovieClip triggers MC's event

On stage, I have a MovieClip named "mc" with a simple rectangle drawn inside. mc also has a Button child named "btn" which is another simple rectangle ( smaller than mc's rectangle obviously). Then I have this code on stage. function mcDown(…
Murat
  • 35
  • 6
2
votes
1 answer

c# How to get the Mouse move direction?

Is it possible to get the mouse moving direction even though the mouse doesn't move on screen? For example it collides with an edge. edit: The user moves the mouse to the top and collides with the top edge of the screen. Then he keeps on moving the…
lorenz albert
  • 1,385
  • 2
  • 11
  • 27
2
votes
3 answers

Move object in random direction in a Java Applet

I'm trying to create an applet in which the user gets a sheep into a pen by moving a dog towards the sheep and making the sheep move away from the dog in a random direction. The sheep and dog are defined as objects. The applet is still in its very…
Will
  • 1,487
  • 1
  • 23
  • 35
2
votes
0 answers

Can't trigger mouseover on an element within an iframe

Within my main page(A), there's an iframe, which loads another page(B) that has a simple element, and within the code for page(B), there is some jQuery that binds a mouseover event handler on the simple element. Now, what I'm trying to do is to fire…
2
votes
1 answer

NSButton image shadow on mouseEntered event

I have a borderless NSButton that contains an image and is subclassed with my ButtonEffect class to detect mouseEntered and mouseExited events. My goal is to have just the edge of the image glow as the mouse enters the button area. I know I can…
wigging
  • 8,492
  • 12
  • 75
  • 117
2
votes
2 answers

JavaScript mouseUp event ignored when mouse is released during drag

I have a
element that is created in my script and appended to another
. I have: coverElm.onmousedown = mouseDownEventHandeler; document.onmouseup = mouseUpEventHandeler; document.onmousemove = mouseMoveEventHandeler; I have the…
Zac
  • 2,201
  • 24
  • 48
2
votes
1 answer

Replace CSS :hover with jQuery

Is there a way to automatically replace all or certain CSS :hover effects with a smooth hover from jQuery (or plain JavaScript or other library would also be OK)? E.g. if for an element a :hover style is defined, to replace this without having to…
Chris
  • 3,756
  • 7
  • 35
  • 54
2
votes
1 answer

Routing Mouse Events through a Sprite in Actionscript 3

In a pure Actionscript 3 project, I have a sprite that overlaps another sprite. The lower sprite normally handles mouse clicks. The lower sprite no longer processes mouse events when it is overlapped by the higher sprite. I understand that this…
Johann
2
votes
2 answers

Mouse Event Handler

The purpose of this program is to allow a user to light up a number of LEDs on a panel by choosing them on screen. I have an array of buttons built where currently, a user has to click all of the buttons individually. The array holds 1536 LEDs,…
user1583208
  • 21
  • 1
  • 2
2
votes
1 answer

HTML element on active event

I want to measure the time between mousedown event and applying CSS active property without using any jQuery functions (pure Javascript). I found that there is onactive event but it is not supported by Opera (the browser on which I want to make this…
Nikolay
  • 185
  • 1
  • 5
  • 14
2
votes
3 answers

Detect double click in mouseReleased method

I need to use mouseReleased method instead of mouseClicked so i need to find a way to Intercept double click. this is the code: public void mouseReleased(MouseEvent e) { if (e.getClickCount() == 2) System.out.println ("Double CLICK…
Luca
  • 1,704
  • 3
  • 29
  • 42
1 2 3
99
100