mouse

jQuery: Is mouse over element?

喜欢而已 提交于 2020-01-14 18:21:44
问题 Merged with How do I check if the mouse is over an element in jQuery?. I could write something pretty easily to determine whether the mouse is over a given element, but is there already anything in the jQuery core library (or a plugin I guess) that will tell me whether the current mouse position is over a given element? 来源: https://stackoverflow.com/questions/2846396/jquery-is-mouse-over-element

Change mouse cursor while left mouse button is pressed?

删除回忆录丶 提交于 2020-01-14 13:25:32
问题 I need to change the mouse cursor while the left mouse button is pressed. Unfortunately changes to the mouse cursor are ignored until the left mouse button is released. Is there any workaround to this? Thanks for any hint! (I'm using WPF and C#) EDIT: Sample Project: http://cid-0432ee4cfe9c26a0.skydrive.live.com/self.aspx/%c3%96ffentlich/WpfApplication5.zip (just run it, instructions are shown in the application) Code for the sample: XAML: <Window x:Class="WpfApplication5.MainWindow" xmlns=

Simulate Click and Drag in OS X

心已入冬 提交于 2020-01-14 04:45:59
问题 I am trying to simulate mouse action via programming. I am not able to do click and drag action reliably. For click and drag I am doing the following actions in the order mentioned below Post left mouse button pressed event at current mouse pointer position (only once) Move the mouse (as mouse down event is already sent, it must act as mouse down and drag, selecting text from the initial mouse postion) Post left mouse button release event to end mouse hold action. In apple applications such

Mouse right click on Firefox triggers click event

一世执手 提交于 2020-01-13 14:54:11
问题 I noticed that the mouse right click on Firefox triggers an addEventListener. I tried this code on more browsers and more OS (IE 11-10-9, Safari, Chrome) and by pressing the mouse right click, only on Firefox the console.log message is always printed. <div id="one-div" style="height:400px;width:500px;background-color:#000;"> click me </div> <script> function cb(event, from){ // if click is fired on <div> with: // left click, both EventListener will be printed. // right click, only the

Get position on canvas AFTER rotating/translating and restoring

♀尐吖头ヾ 提交于 2020-01-13 11:11:54
问题 Okay, this is getting complicated... Given situation: I have a canvas with the dimensions of 800x600. My mouse is at canvas position 100x200 (for example). I save my canvas state. Now I rotate and translate the canvas, I draw a square. I restore my canvas state. Is there any way to determine if my mouse is over the square? I think I would have to translate/rotate my mouse position as well - in the opposite direction, but how would I do this? 回答1: You can get hold of an objects world position

Eclipse Back/Forward navigation using mouse buttons

Deadly 提交于 2020-01-13 03:54:13
问题 There is an addin for Visual Studio called MouseNavi that allows you to use mouse thumb buttons to navigate your history. Does a similar extension exist for Eclipse? 回答1: I don't know of any Eclipse plugin that does this, but assuming you're using Windows: This one should enable you to do what you want: http://www.highrez.co.uk/downloads/XMouseButtonControl.htm With that tool you can assign each mouse button a sequence of keys (Alt+Left for example) and because it can be made application

Multiple mouse pointers?

我只是一个虾纸丫 提交于 2020-01-12 04:26:51
问题 Is there a way to accept input from more than one mouse separately? I'm interested in making a multi-user application and I thought it would be great if I could have 2 or more users holding wireless mice each interacting with the app individually with a separate mouse arrow. Is this something I should try to farm out to some other application/driver/os_magic? or is there a library I can use to accomplish this? Language isn't a HUGE deal, but C, C++, and Python are preferrable. Thanks :) edit:

Multiple mouse pointers?

人走茶凉 提交于 2020-01-12 04:26:05
问题 Is there a way to accept input from more than one mouse separately? I'm interested in making a multi-user application and I thought it would be great if I could have 2 or more users holding wireless mice each interacting with the app individually with a separate mouse arrow. Is this something I should try to farm out to some other application/driver/os_magic? or is there a library I can use to accomplish this? Language isn't a HUGE deal, but C, C++, and Python are preferrable. Thanks :) edit:

jQuery - detect if the mouse is still?

梦想与她 提交于 2020-01-12 03:17:54
问题 I was wondering if there was a way to detect if the mouse is idle for like 3 seconds in jQuery. Is there a plugin that I am unaware of? Because I don't believe there to be a native jQuery method. Any help would be much appreciated! 回答1: You can listen to the mousemove event, start a timeout whenever it occurs and cancel any existing timeout. var timeout = null; $(document).on('mousemove', function() { clearTimeout(timeout); timeout = setTimeout(function() { console.log('Mouse idle for 3 sec')

What is the best way to show a WPF window at the mouse location (to the top left of the mouse)?

六眼飞鱼酱① 提交于 2020-01-11 05:37:07
问题 I have found that this works PART of the time by inheriting the Windows Forms mouse point and subtracting out the height and width of my window to set the left and top (since my window's size is fixed): MyWindowObjectThatInheritsWindow window = new MyWindowObjectThatInheritsWindow(); System.Windows.Point mouseLocation = GetMousePositionWindowsForms(); window.Left = mouseLocation.X - 300; window.Top = mouseLocation.Y - 240; window.Show(); Edit: Here is the code for getting the mouse position..