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
1
vote
0 answers

Mouseenter runs even though cursor didn't move/leave/enter the parent

So, when you click on the element, mouseenter runs, even though it never left the parent, and mouseleave does not fire. I have checked the MDN docs, and neither of the events bubble and aren't cancellable; so why does one run when the other…
Robyn
  • 161
  • 1
  • 8
1
vote
1 answer

mouse movement real time transmission from raspberry pi

i'm trying to send the coordinates of mouse connected to a raspberry pi to an ESP8266 in the same network. I just wrote this bash script #!/bin/bash device='/dev/input/event1' mouseX="*(REL_X), value*" mouseY="*(REL_Y), value*" evtest "$device"…
1
vote
1 answer

Moving mouse cursor with CGDisplayMoveCursor not working as expected when moving between monitors

so I need to be able to move the mouse to any given point (x and y). I'm trying to do it with CGDisplayMoveCursor while it moves the cursors it does not place it where I expect it. I have two monitors in my set up. I get the frame via…
Gama
  • 352
  • 2
  • 16
1
vote
2 answers

Is there a way to translate a nested element with transform="translate(mouseX,mouseY)" in JS?

Edit: Code: jQuery.noConflict() const turnEnum = ["Noughts", "Crosses"] var turn = Math.round(Math.random()) ? turnEnum[0] : turnEnum[1]; var mouseX; var mouseY; var snapX; var snapY; jQuery(document).ready(function() { …
1
vote
1 answer

How to set the mouse cursor to a specified location on a label?

so i have developed this game in visual basic 6.0,a maze game in which i want my mouse cursor to be set on the start label on the form with maze and once the form is activated and gets focus! Dim label1 As New label=Start
1
vote
1 answer

Is there a way to make a plot clickable so it will tell me what EEG channel I am looking at?

Note: This is a question relating to mouse EEG data plotting. I made a plot showing the averaged trial signals for filtered EEG electrode channels. While plotting this I saw a few signals that I want to exclude from my plot, but I don't have a way…
Jackie
  • 33
  • 5
1
vote
0 answers

How to keep mouse keys around

My platform is Linux, and there is a shortcut Alt + Left Shift + Num Lock to enable mouse keys TEMPORARILY. They say this feature is provided by X server, so it can be used on all desktop environments based on X. The problem is that the effect…
Cody
  • 609
  • 4
  • 21
1
vote
1 answer

Detect mouse collision canvas text (JS)

How can I detect whether my mouse is over a piece of text rendered on a Canvas? For example: var c = document.getElementById("myCanvas"); var ctx =…
Luuc van der Zee
  • 103
  • 1
  • 11
1
vote
2 answers

clicking on emacs blows away x selection

Much of the time when I use the mouse to click on an emacs window, the x selection which I hope to paste into the buffer is blown away. This seems to be caused by the slight shift of the hand as I apply the left click causing an inadvertant "drag…
Setjmp
  • 27,279
  • 27
  • 74
  • 92
1
vote
1 answer

How do I get the mouse's position relative to the terminal's window?

How can I get the mouse's position relative to the terminal on Linux? This is what I have so far: use std::ptr; use x11::xlib; fn main() { unsafe { let display = xlib::XOpenDisplay(ptr::null()); if display.is_null() { …
치큰0
  • 43
  • 2
  • 3
1
vote
1 answer

Rotation facing mouse not correct with p5 libraries

i am making a javascript shooter game.i want the the player to rotate towards the mouse.it is working, but the rotation was not correct. I tried this with an image, and it works, but with the sprite itself(player1), is not. i have asked this once…
PineInDisguise
  • 103
  • 1
  • 7
1
vote
1 answer

How To Make Bullets Move Towards Cursor From Player Point?

I'm currently making a 2d top down game in pygame where the player (ship/cursor) moves with keyboard input and will always look towards the mouse point. I've also made it that when the player presses or holds the SPACE key the ship will shoot…
Meltt
  • 33
  • 3
1
vote
1 answer

AutoHotKey: Send a button when another is held down, and after released

in AutoHotKey I want to write a script that will press a button once when the right mouse button is held and press another once its released. I tried writing something (I used numpad0 instead of mousebutton) Numpad0:: Send {d} Numpad0 Up:: Send…
Bg1987
  • 1,129
  • 1
  • 11
  • 25
1
vote
1 answer

How to Make an Image Face The Mouse and Move With Keys in Pygame?

This might sound confusing so I'll try my best at describing. I've wrote some code that in simple has an image in the middle of a window and it will face the mouse position (rotate to face it) when the mouse is over the window. This is fine and all…
Meltt
  • 33
  • 3
1
vote
1 answer

How to fix this error with pygame and fonts

import pygame, sys pygame.init() clock = pygame.time.Clock() coordinate = pygame.mouse.get_pos() screen = pygame.display.set_mode((1000,800), 0, 32) pygame.display.set_caption("Mouse Tracker") font = pygame.font.Font(None, 25) text =…
voltifer
  • 21
  • 1
  • 11