⬆️ ⬇️

Computer or 2 or more mouse pointers on the screen

If you are offered a paid

solution of the information problem,

Try to find free.



In the OS, the default is to work with 1 mouse pointer. Even if you connect 2 or more devices (touchpads, mice, trackballs), all of them at best will move one pointer. Everyone has become accustomed to this, as with the axiom, and even on resources like otvet.mail.ru there are authoritative answers approved by the moderator as closed, that you can’t do 2 pointers (who has access there - correct the misunderstanding).





')

Once, the commercial solution “2 workplaces per 1 system unit” ( EasyCLone ) was known - the ability to create desktops on 2-4 different sets of “display-mouse-keyboard” on a computer, and it was even more profitable than buying 2 PCs for companies, but the rapid depreciation of components, apparently, quickly devalued such a decision and forgot about it.



But the recent topic on a little-known branch of Habr unexpectedly for many shed light on this shaky truth. It turned out that there is a program that, at the driver level, catches every new connected mouse and creates a new pointer for it. Alas, she has a trial period of 15 days , which immediately evaporated her desire to turn it on. Why, if the task is to try an unworked, unknown, but interesting technology? There is a search, the Internet and public need for the task, which means there is an opportunity to find more flexible solutions.




This solution is not about 2 input foci in the system. If the mouse switches to another window or place in the window, then the focus is transferred to this mouse, and the keyboard input cursor moves to that place too. If the OS were created 2 input focus, then this task would be called "2 mouse + 2 keyboard", and the solution would be even more convenient. But from the point of view of the system, it is noticeably more difficult - after all, it is necessary to have not only the mouse driver, but also multiple active windows on the desktop.



2 mouse pointers could be useful for joint almost simultaneous work on 1 desktop (Desktop). For example, the program at the link above, Peanut Butter Pointer , is positioned for the work of an adult and a child (collaboration in training programs).



The search has shown that, indeed, the next aphorism is true, put into the epigraph. There is a free open source program for Windows (April 2004, 2K / XP) and there are instructions for Linux, Debian, X.Org 7.5, 01/19/2010 for connecting the required number of mice + pointers to them.



( Note for Linux, quote : “Currently MPX is not supported in Gtk + and, accordingly, you cannot draw with two mice simultaneously in GIMP or Inkscape, but you can select tools or menu items with one mouse and draw with the other. Gtk + 3. Also, dragging two windows at the same time does not work in the Metacity window manager, but you can already drag icons to Nautilus while moving the window in Metacity. Qt supports multitouch from version 4.6. ”)


Let us dwell on the solution for Windows XP.



This is a “naked” driver without an installer. To connect it, you need to do some actions on the instructions. (In English - cpnmouse.sourceforge.net/install.html .) Therefore, the instruction below is for researchers, not for ordinary consumers of the final product. Two mice should be installed at least to see how it works and to touch the “lower horizons” of device management at the driver installation level. Well, a retelling with a translation and some illustrations will confirm confidence that the goal is close and achievable, you just need to "know how."



Installing drivers for 2 or more mice.



1. All mouse type devices must be connected and working (move the pointer).

2. From the administrator, we put the existing 2 * .inf and * .sys files in the \ windows \ inf and \ windows \ system32 folders.

3. Select " Control Panel -> System -> Hardware -> Device Manager ".

4. Next, "Mice and other pointing devices", in this folder we see working mouse devices.



The driver does not impose restrictions on the type of mice (COM, PS / 2, USB). But it will require writing some data from the device properties to the cpnmouse.inf file.



5. When a second mouse is connected to the USB, it is defined as the “HID-compilant mouse”. For further installation, it is likely that knowledge of the Equipment Code will be necessary. The author of the drivers recommends getting them using some unnecessarily powerful program for reading data from equipment, but everything you need is visible in the properties of the mouse. We look:



Properties HID-compilant mouse -> Details -> Codes (ID) of the equipment -> A line (usually the 2nd) of the HID \ Vid_XXXX & Pid_XXXX type .



For example, in the case of the MediaTech MT1068T “Crabby” mouse, it was HID \ Vid_15d9 & Pid_0a4c .



If this code is not in the cpnmouse.inf file in the lines of the form (in the [CPNGroup.Mfg] section)



%CPNGroup.DeviceDesc1% = usbinst, HID\Vid_XXXX&Pid_XXXX ,



It is necessary to make it to the end of the list of such lines. For the second A4Tech mouse on a PS / 2 port, this property looked like this:



ACPI\PNP0F13

*PNP0F13




By analogy, in cpnmouse.inf there is a line



%CPNGroup.DeviceDesc0% = ps2inst, *PNP0FAKE



A similar entry should also be added to it immediately after it:



%CPNGroup.DeviceDesc0% = ps2inst, *PNP0F13



Indeed, if it is not added, the required driver with the name “CPN Tools mouse filter driver PS / 2” is no longer available.



6. After adding information, do in the Device Manager: HID-compilant mouse -> “right mouse click” -> Update driver ... -> Install from a specified location -> Next -> (Remove search on removable media) + Do not search . I myself will choose the necessary driver -> Install from disk -> c: \ windows \ inf (or another way% system_root%) -> CPN Tools mouse filter driver USB -> Next .



The dialog “Insert such a disk into the disk input device” -> OK -> Browse -> c: \ windows \ system32 \ cpnmouse.sys -> Open -> OK will appear (there will be a label “The wizard has finished installing programs for: CPN Tools mouse filter driver USB) -> Done .



In the Device Manager, instead of the HID-compilant mouse, the CPN Tools mouse filter driver USB will appear.



7. Repeat the same steps for the PS / 2 mouse with the difference that we will select the “CPN Tools mouse filter driver PS / 2”. You will be prompted to reboot. If you refuse it, we see that the PS / 2 mouse has also changed to “CPN Tools mouse filter driver PS / 2”. Let's prepare the computer for reboot and execute it.



Everything is good, but the mouse pointer does not split apart ...



Use 2 mice.



The driver is only half the battle. Now we need a program that implements the appearance of 2 (or more) cursors. Or the use of a mouse event in an application program at the API level (there is an archive, description and source codes) in other application programs. The second way is doomed to handicraft - working with 1-2-3 programs, and common applications can cause interest. The common application proposed by the author, there is one - the program ordinary-binary-0.1.0.zip and as an addition, cpnmouse.lib . It creates 2 drawing pointers for 2 mice and throws the only real pointer to the moving mouse if ordinary.exe and cpnmouse.lib are laid out in the same folder . So we get the desktop view rendered in the header:





If you do not put cpnmouse.lib in the folder, we will work only with the pointer jumping from mouse to mouse (without drawing arrows). This turns out to be even more convenient, because the display of drawing cursors has a drawback - artifacts when dragging objects and selecting text, however, do not affect the functionality of the application programs. Such traces, for example, left little “dragging out” of the program window for its title.





There are a couple of other equally serious flaws. Ignorance of the program more than 1 screen (!), Which puts an end to the idea of ​​"easy" to work with 2 or more monitors. There is such a “miracle”, as the loss of the ability to scroll the text with the mouse wheel. (Oddly enough, the middle and right buttons work.) Additional buttons of non-standard mice, of course, will not work (the drivers are not native). However, the codes of all programs and drivers are open (VC ++ 6), nothing prevents them from being finalized. Licenses in the archives could not be found, but somewhere in the network there was a link to licensing these developments on behalf of the university.



What with such drivers can be expected in games, graphic editors? Too much should not be expected, especially games with 2 players. 2 mice are, in fact, 1 mouse, but capable of instantly moving from one trajectory to another, alternately performing clicks in 2 distant parts of each other, without being carried around the table by a manipulator. Therefore, the game of 2 people with 2 mice will always be (unless special drivers are written, but they are not written ) on behalf of one player, but with instant interception of actions from each other.



It is not yet known how much better the Peanut Butter Pointer paid program is than this development. The prospect of regularly installing it and uninstalling without a trace after 2 weeks with a special uninstaller greatly reduces the desire to explore it and use it. Maybe readers who have experience with it will tell and show its achievements in more detail.

Source: https://habr.com/ru/post/86023/



All Articles