Entrance from 4 different mice

I need to create a simple application that takes (selects only) the input from 4 USB mice connected in addition to the built-in touchpad on the laptop. My preferred operating system for this installation is Linux.

Any idea how I could recognize the application that the mouse clicked on? I am open to programming in C or any other. This is a simple, one-time project, so nothing is too complicated.

+3
source share
3 answers

MPX is where it is used for several mice and multi-touchs under Linux, but you will need to use xorg xserver 1.7 to get the “correct version”; this is usually accepted as part of X11R7.5 , which has just come out as "stable and not yet integrated into distributions." (Even xorg-edgers does not have this, although you would have watched if you are Ubuntu-er.)

GTK +, , , , (GdkEvent.gdk_event_get_device), , , . , Qt4. , , : , , , Linux.

+3

, , .

bobince xorg /etc/X11/xorg.conf. , ,

# commented out by update-manager, HAL is now used

HAL , 2001. man -k hal lshal, 133 (!) HAL .

linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:0b.0/usb2/2-7/2-7:1.0/input/input6/event6'

. , /dev/input/mouse3. /dev/input!

, /dev/input/mouse 3:

root@carl-ubuntu:/dev/input# od -t x1 -w6 mouse3
0000000 09 00 00 08 00 00
*

, 09 00 00 08 00 00, .

: /dev/input/mouseX. chmod a+r , . 4 , , , , , .

+4

, , , , . , Linux?

, luvieere.

+2

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


All Articles