![]() ![]() Update : The app didn’t work well on Windows 10. You can tweak the source code for vertical and horizontal sensitivity or for general code improvement. I created a MarbleScroll.cs class for scrolling and Visual Studio project which includes MarbleScroll.cs and code for background application running in system tray. Therefore it isn’t enough to compare foreground window and window from point, but we have to compare their root owners, which can be done with GetAncestor function. That is because drop-down list is normally a child window and we are focusing the parent window. If we focus it every time, scrolling won’t work in drop-down lists. If they aren’t equal, we focus the underlying window with SetForegroundWindow function. The idea behind scrolling in non focused window under mouse pointer is to find underlying window with WindowFromPoint function and compare it to focused window from GetForegroundWindow function. For simulating a scrolling wheel we can use mouse_event function (MOUSEEVENTF_WHEEL and MOUSEEVENTF_HWHEEL). We need this to detect back button press and marble movement. In windows we can capture low level mouse events in User32.dll with SetWindowsHookEx function (WH_MOUSE_LL). scrolls the windows under mouse pointer without focusing it.back button without marble movement produces normal back operation.vertical and horizontal scrolling with back button + marble movement.runs in system tray where you can close it if you require to.compiled for right handed mouse, but it works for left handed too.NET framework 4.5, but it should compile on any other if you choose it in project source NET framework, you can install it from here. Place it in any folder on your hard drive and create shortcut in Startup folder for auto start at reboot. If you use SetPoint, you need to set Generic button as Button task for the back button ( demonstration). scrolling is done on application with mouse focus and without the need of clicking on application to gain focus. ![]() support for scrolling in all applications without modifying them.I decided to go with C#, as windows is my primary OS for workstation. After digging around I found out it can be done with capturing low level mouse events in OS. If you don’t turn the marble, then it acts just like normal back button. The main idea is scrolling with pressing the back button and turning the marble. I decided to write a small program, code name MarbleScroll, that would simulate wheel like scrolling. Logitech has provided an alternative solution for scrolling, but it’s non intuitive to use, in other words, useless. The only real big downside of the mouse is, that it lacks the scrolling wheel. You need couple of weeks to get used to it, but then it’s simple to use like any other mouse. It’s symmetrical, meaning you can use it if you are left or right handed. Probably because I spent 8+ hours per day on computer and incorrect hand positions/movement can lead to Carpal tunnel syndrome. Mainly because I started to feel pain in my wrist and it didn’t go away over time. Recently I bought an ergonomic mouse Logitech Trackman Marble. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |