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
38
votes
9 answers

Detect touchpad vs mouse in Javascript

Is there any way to detect if the client is using a touchpad vs. a mouse with Javascript? Or at least to get some reasonable estimate of the number of users that use touchpads as opposed to mice?
Fragsworth
  • 33,919
  • 27
  • 84
  • 97
37
votes
4 answers

Listen to JFrame resize events as the user drags their mouse?

When a user clicks on the corner of a JFrame to resize and drags the mouse around, the JFrame redraws based on the current position of the mouse as the user drags. How can you listen to these events? Below is the what I have currently tried: public…
Clinton
  • 3,638
  • 3
  • 26
  • 33
36
votes
7 answers

Can I navigate, zoom in and zoom out R plots?

I would like to know if R allows to pan and zoom images produced with the "plot" function. I would like to obtain the plot transformation using the mouse and not through the command line, is it possible? Thanks in advance.
rlar
  • 856
  • 1
  • 10
  • 15
36
votes
11 answers

How do you hide the mouse pointer under Linux/X11?

How do I hide the mouse pointer under X11? I would like to use the built in libraries in order to do this and not something like SDL (SDL_ShowCursor(0)) or glut (glutSetCursor(GLUT_CURSOR_NONE)). Also, the mouse pointer should be hidden no matter…
rck
  • 2,020
  • 2
  • 23
  • 23
36
votes
6 answers

jQuery Set Mouse Position (not cursor position)

I have a link that, when clicked, I would like it to move the position of the mouse to the right (or anywhere within the viewport, for that matter). in code it would probably look similar to the following: $('a#expand').click(function(e){ …
Michael
  • 1,786
  • 5
  • 23
  • 42
35
votes
5 answers

How do I drag and drop a row in a JTable?

How do you setup a JTable to be able to drag a row to a different index in the table. For example if I have 5 rows and I want to drag the 4th row to the 2nd position?
ShawnD
  • 992
  • 1
  • 8
  • 12
35
votes
6 answers

tmux mouse copy-mode jumps to bottom

I am using tmux in a ssh session. I am using multiple panes and windows. I have mouse-mode enabled which works great so far. When I select text it gets automatically copied to the tmux-buffer and the window jumps to the end. So if i scroll up and…
stfl
  • 553
  • 5
  • 12
34
votes
8 answers

How to Edit multiple lines in Visual studio 2017 at once

I'm following a series of videos on Youtube on how to develop a dashboard using bootstrap. The developer in that series uses the Sublime Text editor. I've noticed that sometimes he clicks on multiple places (one after another) then start typing, and…
Richard77
  • 20,343
  • 46
  • 150
  • 252
34
votes
2 answers

Getting MouseMoveEvents in Qt

In my program, I'd like to have mouseMoveEvent(QMouseEvent* event) called whenever the mouse moves (even when it's over another window). Right now, in my mainwindow.cpp file, I have: void MainWindow::mouseMoveEvent(QMouseEvent* event) { qDebug()…
Switch
  • 5,126
  • 12
  • 34
  • 40
33
votes
7 answers

detecting keyboard, mouse activity in linux

I need a way to detect mouse/keyboard activity on Linux. Something similar to what any IM program would do. If no activity is detected for, say 5 minutes, it will set your IM status to "I'm not here right now". Any help towards this is…
Afroz
33
votes
4 answers

Quicktime X - How to hide mouse during screen capture?

I am attempting to record an app demo on the simulator, and want to use the Quicktime screen capture feature. However, I would like to hide the mouse during the capture. Is this possible? Doesn't seem to be a built in feature, so I am assuming I…
JimmyJammed
  • 9,598
  • 19
  • 79
  • 146
33
votes
6 answers

Javascript: Capture mouse wheel event and do not scroll the page?

I'm trying to prevent a mousewheel event captured by an element of the page to cause scrolling. I expected false as last parameter to have the expected result, but using the mouse wheel over this "canvas" element still causes…
Jem
  • 6,226
  • 14
  • 56
  • 74
32
votes
3 answers

programmatically mouse click in another window

Is it possible to click programmatically a location in another window without moving the mouse to that location and even if the window is not on-top? I want to send a kind of message to another window to simulate a mouse click on a location. I…
Dagob
  • 695
  • 1
  • 12
  • 23
30
votes
4 answers

Jquery: mousedown effect (while left click is held down)

I need a function that executes a function while a button is pressed and stops executing when the button is let go $('#button').--while being held down--(function() { //execute continuously });
Zebra
  • 3,858
  • 9
  • 39
  • 52
30
votes
6 answers

Which is the easiest way to simulate keyboard and mouse on Python?

I need to do some macros and I wanna know what is the most recommended way to do it. So, I need to write somethings and click some places with it and I need to emulate the TAB key to.
Bruno 'Shady'
  • 4,348
  • 13
  • 55
  • 73