Questions tagged [mouse]

A mouse is a pointing device that functions by detecting two-dimensional motion relative to its supporting surface.

Wikipedia

Wikipedia defines mouse as follows:

In computing, a mouse is a pointing device that functions by detecting two-dimensional motion relative to its supporting surface. Physically, a mouse consists of an object held under one of the user's hands, with one or more buttons.

http://en.wikipedia.org/wiki/Mouse_%28computing%29

4371 questions
279
votes
16 answers

Copying text outside of Vim with set mouse=a enabled

After enabling set mouse=a, text copied inside of Vim will not paste outside of Vim. Does anybody know of a way to fix this? Here, selecting text with the mouse turns on visual mode and disables the Copy option in the popup menu:
lyuba
  • 6,250
  • 7
  • 27
  • 37
276
votes
19 answers

Controlling mouse with Python

How does one control the mouse cursor in Python, i.e. move it to certain position and click, under Windows?
Sasha
  • 5,783
  • 8
  • 33
  • 37
228
votes
24 answers

Focus-follows-mouse (plus auto-raise) on Mac OS X

(I don't want to hear about how crazy I am to want that! :) Focus-follows-mouse is also known as point-to-focus, pointer focus, and (in some implementations) sloppy focus. [Add other terms that will make this more searchable!] X-mouse
dreeves
  • 26,430
  • 45
  • 154
  • 229
177
votes
23 answers

Detecting that the browser has no mouse and is touch-only

I'm developing a webapp (not a website with pages of interesting text) with a very different interface for touch (your finger hides the screen when you click) and mouse (relies heavily on hover preview). How can I detect that my user has no mouse to…
nraynaud
  • 4,924
  • 7
  • 39
  • 54
175
votes
17 answers

JavaScript: Check if mouse button down?

Is there a way to detect if a mouse button is currently down in JavaScript? I know about the "mousedown" event, but that's not what I need. Some time AFTER the mouse button is pressed, I want to be able to detect if it is still pressed down. Is…
TM.
  • 108,298
  • 33
  • 122
  • 127
160
votes
14 answers

Determine which element the mouse pointer is on top of in JavaScript

I want a function that tells me which element the mouse cursor is over. So, for example, if the user's mouse is over this textarea (with id wmd-input), calling window.which_element_is_the_mouse_on() will be functionally equivalent to…
Tom Lehman
  • 85,973
  • 71
  • 200
  • 272
157
votes
10 answers

Move the mouse pointer to a specific position?

I'm building a HTML5 game and I am trying to put the mouse cursor over a certain control on a specific event so that moving in a specific direction always has the same result. Is this possible?
Dennkster
  • 2,161
  • 2
  • 15
  • 13
136
votes
19 answers

How can I detect when the mouse leaves the window?

I want to be able to detect when the mouse leaves the window so I can stop events from firing while the user's mouse is elsewhere. Any ideas of how to do this?
Matt
131
votes
10 answers

Get Mouse Position

I would like to simulate a natural mouse movement in Java (going from here to there pixel by pixel). To do that I need to know the starting coordinates. I've found the method event.getX() and event.getY() but I need an event... How can I know the…
Martin Trigaux
  • 5,311
  • 9
  • 45
  • 58
124
votes
6 answers

Change the mouse cursor on mouse over to anchor-like style

If I hover the mouse over a div the mouse cursor will be changed to the cursor like that in HTML anchor. How can I do this?
cola
  • 12,198
  • 36
  • 105
  • 165
113
votes
7 answers

How to get mouse position in jQuery without mouse-events?

I would like to get current mouse position but I don't want to use: $(document).bind('mousemove',function(e){ $("#log").text("e.pageX: " + e.pageX + ", e.pageY: " + e.pageY); }); because I just need to get the position and process the…
MartyIX
  • 27,828
  • 29
  • 136
  • 207
92
votes
3 answers

Java Mouse Event Right Click

On my three button mouse MouseEvent.BUTTON2= Middle Click and MouseEvent.BUTTON3 = Right Click. Is this the case on a two button mouse? Thanks
DD.
  • 21,498
  • 52
  • 157
  • 246
77
votes
3 answers

What does it mean to "Capture the mouse" in WPF?

On System.Windows.UIElement there is a CaptureMouse() and a paired ReleaseMouseCapture() method. In this WPF DragDrop sample they call CaptureMouse on MouseDown and release it on MouseUp. The documentation in MSDN is about as useless as it comes -…
Eclipse
  • 44,851
  • 20
  • 112
  • 171
72
votes
4 answers

Simulating mouse input programmatically in OS X

Is it possible to simulate the actions of a mouse from a program in OS X? Specifically, the short version is that I'm trying to simulate a touchscreen using two webcams. So assuming I can get X,Y positions, can I send information to the OS as a…
Rob Lourens
  • 15,081
  • 5
  • 76
  • 91
61
votes
1 answer

Disabling mouse acceleration in Mac OS X

First of all, here's the userland question: Disabling mouse acceleration in Mac OS X @ superuser To summarize: I want to have linear mouse response on Mac OS X. That is, no acceleration; an adjustable but constant pixels pointer moves / meters…
aib
  • 45,516
  • 10
  • 73
  • 79
1
2 3
99 100