mouse

focus follows mouse (NO autoraise) in Mac Sierra

倖福魔咒の 提交于 2019-12-03 05:47:26
I'm aware of the other threads on this topic but they are autoraised-based and/or all the answers point to software that's no longer being developed. I'm just looking for this simple feature: focus follows mouse WITHOUT autoraise for Mac. Zooom2 was able to perform this, but they are no longer developing their software. I'm not using the terminal and need to copy/paste and read between multiple programs with multiple windows, someone please tell you've found a solution to this? chunkwm has recently added a setting ffm_disable_autoraise which works well for me on macOS Mojave. To enable only

mouse position to isometric tile including height

烈酒焚心 提交于 2019-12-03 04:14:40
问题 Struggeling translating the position of the mouse to the location of the tiles in my grid. When it's all flat, the math looks like this: this.position.x = Math.floor(((pos.y - 240) / 24) + ((pos.x - 320) / 48)); this.position.y = Math.floor(((pos.y - 240) / 24) - ((pos.x - 320) / 48)); where pos.x and pos.y are the position of the mouse, 240 and 320 are the offset, 24 and 48 the size of the tile. Position then contains the grid coordinate of the tile I'm hovering over. This works reasonably

ShowCursor(FALSE) does not work

点点圈 提交于 2019-12-03 04:01:30
I know this may sound to be a duplicate question but trust me it's not. I have referred this question , but was not of much help as I am trying with a console application and the answerer himself tells he does not know the reason why ShowCursor(FALSE) does not work for console applications. This thread did not help me either. Here are the things I tried: Using ShowCursor(): while(ShowCursor(false)>=0); //did not work I first suspected that it was because of this statement in the msdn : When Windows starts up, it checks if you have a mouse. If so, then the cursor show count is initialized to

Keyboard / Mouse input in C++

柔情痞子 提交于 2019-12-03 03:58:46
问题 I'm wondering how to accept keyboard and mouse input in C++, using Visual Studio 2010, for Windows 7 32-bit. --EDIT: I forgot to mention that I need keyboard / mouse input without interrupting the flow of the program. Something like a listener. I don't want to have to pause the program and ask for input, and then have the user type it out and press enter. What I'm looking for is more like: If user presses W, S, A, D -> something happens. Or: If user presses leftmousebutton in -> something

Protractor - does anybody know how to click on element with RIGHT MOUSE BUTTON?

岁酱吖の 提交于 2019-12-03 03:57:28
I know that protractor click on element by default with left mouse button. How to do it to click with RIGHT MOUSE BUTTON ? el.click('RIGHT'); ? I would have done like this: browser.actions().mouseMove(el.find()).perform(); browser.actions().click(protractor.Button.RIGHT).perform(); Based on what I saw in actionsequence.js and Protractor rightClick issue #280 The accepted solution for this question isn't the best way to go about this. Browser actions' .click() method accepts an optional arg for clicking the right button. A better solution, from the webdriverJs api is: browser.actions() .click($

iTerm2 – scroll less output with mouse

筅森魡賤 提交于 2019-12-03 03:38:11
问题 I just switched from OSX Terminal to iTerm2, and I seem to have lost one piece of functionality. In Terminal, I could scroll through output of the less command with my mouse, because I had installed MouseTerm. However, when I try scrolling less output in iTerm2, the window's scrollbar moves instead. Strangely, scrolling works as expected with vim . How can I scroll less output with my mouse in iTerm2? 回答1: The iTerm2 issue is now marked as "fixed" - but the fix is to add a hidden option, so

How do I use Rundll32 to swapmousebutton?

做~自己de王妃 提交于 2019-12-03 03:32:20
I'm repeating a question from another forum, as I'd like the same answer. From MSDN's SwapMouseButton Function . How do I pass boolean data from command prompt through rundll32.exe to a boolean type argument in a command running from user32.dll? I'm trying to run this from CMD (the command prompt) RUNDLL32.EXE user32.dll,SwapMouseButton * Where the asterisk is here is where the argument should go. I already ran it without an argument and it swapped my left and right mouse buttons (seems TRUE is the default entry for the boolean argument). Now I want to undo it. However I've tried each of these

Detecting when the mouse is not moving

空扰寡人 提交于 2019-12-03 03:16:02
问题 I am able to find the cursor position. But I need to find out if the mouse is stable. If the mouse wasn't moved for more than 1 minute, then we have to alert the user. How its possible, are there any special events for this? (Only for IE in javascript) 回答1: Set a timeout when the mouse is moved one minute into the future, and if the mouse is moved, clear the timeout: var timeout; document.onmousemove = function(){ clearTimeout(timeout); timeout = setTimeout(function(){alert("move your mouse")

jQuery - detect if the mouse is still?

五迷三道 提交于 2019-12-03 02:41:16
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! Felix Kling 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'); }, 3000); }); DEMO This can be very easily done without jQuery as well (only binding the event

Control the mouse cursor using C#

Deadly 提交于 2019-12-03 02:37:00
I'm trying to write a program using C# that would allow me to remotely take control of the mouse on a windows machine. This would allow me to issue commands to the mouse to move to a certain part of the screen and then click on that part of the screen. I was wondering if there were any C# classes that I would be useful in achieving this goal. Any help is appreciated. Thanks! I think unless you're just positioning the cursor over your own application, you have to use a windows api call. You can reference that in C# as such: [DllImport("user32")] public static extern int SetCursorPos(int x, int