Y
Y
Yuri Lobanov2014-06-11 15:52:45
Mouse
Yuri Lobanov, 2014-06-11 15:52:45

How to customize the middle mouse button for certain programs

Hello.
The situation is that I work in a large number of programs. SolidWORKS, CorelDRAW, Autocad, Photoshop, Adobe Illustrator. Sometimes solid, corel and ai are running at the same time. Some of the unpleasant moments: the middle mouse button (clicking on the wheel) in SolidWORKS, CorelDRAW, Autocad perform the function of rotation (solid), in Corel and AutoCAD - dragging the workspace. The rotation of the wheel is the scale (though it is inverted in the solid). But in the damned ai, the functions are completely different, you have to use a space to drag the field, for the alt scale. Everything would be fine, but when you use all these programs - it's really a hemorrhoid to reconfigure.
1. I was looking for how to reconfigure ai - I did not find anything. If there is a way, I will be very grateful.
2. If you can change the settings in windows for the mouse for a specific program - that would be great too!
3. I'm just about to buy a mouse, tell me if it's possible to buy a mouse, where it is possible to set up a wheel for ai to work like in Corele. Or maybe there is another option to correct the situation, for example, hang on an additional mouse button or press alt, or press alt + LMB.
Of course, I'm used to using only three mouse buttons, but I think I'll quickly get used to it.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
T
TomasHuk, 2014-06-11
@iiil

You can write a script in Autoit or Autohotkey in which you can simply remap the keys as you like. For example, when you press the middle button on the mouse, you can simulate a space or any other command. Moreover, you can specify for which application (window) this replacement should be used.
Here is general information with examples for Autohotkey and a list of keys . To work, you need to download Autohotkey itself, make a script (a simple text file) and add it to startup. To override keys for a specific window, you must first define the window class using the built-in program AU3_Spy.exe. When you press the middle mouse button, check the class of the active window and if the window is Adobe Illustrator, for example, then send a space to it, or whatever you want.

S
Sergey Kononenko, 2014-06-11
@HackFeed

If you take a mouse with programmable buttons, then you can write different macros for different programs (more precisely, reconfigure the desired button).

A
Anton Kiselyov, 2022-04-13
@zamboga

A similar task. Move the canvas in Visio by holding down the right or middle mouse button .
Regularly, Visio can't do that. But you can move the canvas in Visio by holding Ctrl + Shift + Right Mouse Button, which is very inconvenient.
In total, I needed a replacement "hold Ctrl + Shift + Right Mouse Button + move the mouse" → "hold the Middle Mouse Button (or right button) + move the mouse"
For the solution, I used a self-written script on AutoHotKey (wiki and documentation here: https://ahk-wiki .ru )
I think the example and comments in the code are enough to do the same for other software.

#If WinActive("ahk_exe visio.exe")	;работа скрипта только в окне Visio

MButton::				;нажимаем СреднююКнопкуМыши. Если надо удерживать нажатой ПравуюКнопкуМыши — в этом месте заменить на RButton
While GetKeyState("MButton", "P")=1	;держим нажатой CКМ. Если надо ПКМ — в этом месте заменить на RButton
{
SendInput {Control Down}{Shift Down}	;отправляем нажатие CTRL+Shift
Sleep, 20				;ждём 20 мс, иначе у меня была некорректная работа скрипта
SendInput {RButton Down}		;отправляем нажатие ПКМ (тут на MButton менять не нужно, тк в Visio надо отправить именно ПКМ)
KeyWait MButton				;отжимаем CКМ. Если удобнее с нажатой ПКМ — в этом месте заменить на RButton
SendInput {Control Up}{Shift Up}{RButton Up};отправляем отжатие всех кнопок (тут на MButton менять не нужно, тк в Visio надо отправить отжатие именно ПКМ)
}
Return

PS Sorry for necroposting, but here Yandex leads search traffic to the question from the title. I'm exhausted trying to figure it out :)

Y
Yura, 2015-04-05
Yur @YuraYur

Write down the result, did you manage to solve the issue using the script that TomashUA described . Or perhaps already found some other solution?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question