I Like so much of Java and Linux.
The default use of this mouse is Windows and MacOSX.
This mouse is not full used in Linux but I read this article:
https://www.baeldung.com/linux/mouse-events-input-event-interface
And other for add ...
- https://wiki.archlinux.org/title/Logitech_MX_Master
- https://michael-verschoof.medium.com/setting-up-mx-master-mouse-on-linux-aae0e2ce3962
- https://zue.ge/using-logiops-to-configure-the-mx-master-3-on-linux/
- https://wiki.archlinux.org/title/Logitech_MX_Master
- https://linux-hardware.org/?id=usb:046d-c08a
- https://askubuntu.com/questions/1122259/logitech-mouse-mx-vertical-ubuntu-18-software
Code of Linux for undestand it message structure:
Structure of timeval em c++:
And I see this video: https://www.youtube.com/watch?v=a8w71o8YB0g
And with this, i decide make this project for make 6 diferents tasks (as shortcuts) on my linux.
Simple Project for Make shotcuts using moving and click alternatives keys.
I have any application then use click buttons, for example: Firefox for "go next" and "go previus".
But I no have events for others application as xterm. Becase this and I'll use mouse and application (or name of window).
Ok, but how can found current application for where is mouse pointer? The solution is xdotool program.
With it we can make action mouse buttons with application used/focused.
Then I can think in application with actions as
"Configuration":{
"delayMaxBetweenClickAndLeave":"100ms",
"delayMaxBetweenClicks": "350ms",
"NoWindows": {
"OnClickButton1": {
"ignore":false,
"run":"IntelliJ"
}
},
"Window Name Application RegExp" : {
"OnClickButton1" : {
"ignore": false,
"run" : "Program to execute"
}
}
}
For do no have doubts: I show number of buttons used in this project
With this configuration, I can test with simple click button.
- Get title of windows focused or active window :
xdotool getactivewindow getwindowname
- Get pid of process this windows
xdotool getactivewindow getwindowpid
This is a service make with Java and runing as root or input user.
-
- -> Start as Service ...
- -> Read configuration file
- -> Read What event file is connected
- -> Loop while (true)
- -> If receive kill exit of loop
-
- ->
-
- ->
-
- ->
- Java 21
- evemu-tools
- evtest
- xdotools