MouseEvent Plugin

Questions and comments specific to a particular plugin should go here.

Re: MouseEvent Plugin

Postby kgschlosser » Thu Jul 06, 2017 4:17 am

ok so there is a way to get the extra buttons from the mouse. I will play around with it to see if i can't get it working for ya.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2712
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MouseEvent Plugin

Postby kgschlosser » Thu Jul 06, 2017 7:54 am

OK I have updated this plugin.

simply double click it to install

Added wheel up and down events.
Added horizontal wheel left right events (pushing the wheel from left to right)
Added up/down Events to all of the buttons
Added button 4 up/down events (forward)
Added button 5 up/down events (back)


NOTES:
depending on the behavior of your mouse you may get a down and up event even if you are holding the button this applies to button 4 and button 5
if the window you have in focus has no horizontal bar you may get wheel up and down events when pushing the wheel left or right

I also added double click support but this doesn't appear to be working. it may with another mouse. it could simply be the mouse I am using doesn't have driver that will generate these kinds of notifications (that's what i get for buying a logitech performance MX).

I have also made it so that when this plugin starts it will shut down the mouse events generated by EventGhost as this would become obsolete
Attachments
MouseEvent-1.1.0.egplugin
(27.81 KiB) Downloaded 29 times
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2712
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MouseEvent Plugin

Postby farbox » Sun Jul 09, 2017 11:40 pm

Tried installing your new version, with latest version of EG, and still getting an error below:

Error loading plugin file: C:\Program Files (x86)\EventGhost\plugins\MouseEvent
Traceback (most recent call last) (0.5.0-rc3):
File "C:\Program Files (x86)\EventGhost\plugins\MouseEvent\__init__.py", line 103, in <module>
__import__('pyHook.HookManager')
ImportError: No module named pyHook.HookManager

Cant understand why...
farbox
 
Posts: 37
Joined: Fri Jul 18, 2008 1:44 am

Re: MouseEvent Plugin

Postby topix » Mon Jul 10, 2017 8:42 am

Inside the MouseEvent plugin folder is a folder pyHook. Copy or move this folder to lib27\site-packages\ inside the EventGhost program folder.
topix
Experienced User
 
Posts: 350
Joined: Sat May 05, 2007 3:43 pm
Location: Germany

Re: MouseEvent Plugin

Postby kgschlosser » Mon Jul 10, 2017 3:39 pm

you shouldn't have to move the folder. it should work right form there.

hmmm.....
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2712
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MouseEvent Plugin

Postby topix » Mon Jul 10, 2017 5:54 pm

I've changed the way the plugin imported pyHook. Now the plugin loads without moving the pyHook folder (at least for me it works :wink: )
Attachments
MouseEvent_1_1_1.egplugin
Plugin: MouseEvent
Version: 1.1.1
(27.71 KiB) Downloaded 24 times
topix
Experienced User
 
Posts: 350
Joined: Sat May 05, 2007 3:43 pm
Location: Germany

Re: MouseEvent Plugin

Postby kgschlosser » Mon Jul 10, 2017 7:07 pm

@topix

The problem is with the way the import is done now it doesn't override the MouseEvent like it should so you don't get the back and forward events. I am going to tinker with it a bit and see if there is a way I can get it to function properly.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2712
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MouseEvent Plugin

Postby topix » Mon Jul 10, 2017 7:20 pm

Hmm, if it doesn't overwite correctly, what would not work? Any misbehaviour?

After adding the plugin and running the 'enable MouseEvents' macro i've got events and they all looked correct.
topix
Experienced User
 
Posts: 350
Joined: Sat May 05, 2007 3:43 pm
Location: Germany

Re: MouseEvent Plugin

Postby kgschlosser » Mon Jul 10, 2017 9:10 pm

give this one a shot guys. i am sorry about the one i posted earlier. I forgot I had pyHook in my Python installation and it would load form there. that is my fault. This one will make sure that it loads only the pyHook that is included with the plugin. and it will do the override correctly as well so the forward and back buttons work. And I also fixed it restarting the original mouse plugin if this one is stopped.

TY topix for the import fix unfortunately you didn't know the odd coding that had to be done to override the MouseEvent in the HookManager module. the import in the __init__ of pyHook was a * import you can't override it from pyHook.MouseEvent because that is not the same one that pyHook.HookManager.HookManager is seeing. that is why I had to use sys.modules to make sure I was grabbing the proper one form the HookManager module it's self.
Attachments
MouseEvent-1.1.2.egplugin
(27.96 KiB) Downloaded 25 times
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2712
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MouseEvent Plugin

Postby kgschlosser » Mon Jul 10, 2017 9:11 pm

the events for the forward and back buttons. buttons 4 and 5. I also think the wheel left and right as well tho i forgot to test those and they would only show up properly if the window you have in focus has a horizontal scroll bar other wise they will show up as a wheel up and down. which is correct behavior because it does in fact move the vertical bar if there is no horizontal bar.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2712
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MouseEvent Plugin

Postby farbox » Mon Jul 10, 2017 10:50 pm

EXCELLENT!

Now the installation is working fine!
Thanks guys, and now I will try to get it to do what I want!

Cheers!

EDIT: Unfortunately it didnt detect the side wheel click on my Logitech MX revolution, which is what I needed it for... :-(
But at least we got the install sorted! :-)
farbox
 
Posts: 37
Joined: Fri Jul 18, 2008 1:44 am

Re: MouseEvent Plugin

Postby kgschlosser » Tue Jul 11, 2017 3:36 am

it does work for the side wheel click I have the same mouse. you have to be over a windows that has a horizontal scroll bar otherwise it will show up as wheel up and down. and this is windows that does this no way around that. Tho i do have the Logictech API dll file and I am going to start playing with that and see if I can get a plugin going that will detect all the buttons on the Logitech mice. including the MX Air with gestures and z axis also. I am going to have to make another dll to access the thing tho as i do not have the source file for it and I do not know what the actual function calls are.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2712
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MouseEvent Plugin

Postby kgschlosser » Tue Jul 11, 2017 11:58 am

well.. that was a no go on the API I got for Logitech. turns out it is 10 years old and they have no made a new one and the only thing that kinda works it the getting of the resolution. tho i do not know if it is reporting the proper amount. so my search continues. I have found some documentation on the unifying HID** messages. and these i may use to see if i can capture buttons 7+ on the mice.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2712
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MouseEvent Plugin

Postby justahotbag2 » Sat Jul 15, 2017 3:00 pm

Is this update not compatible with EG 0.4 r1722, or is it just me? I'm just making notice of it, since that has been my experience. Even after a manual install to 1722's usual plugin location.

However since someday, I'll figure out my EG 0.5 issues, I would just like to inquire about a feature request, I can't even be sure isn't already there.
Would it be possible to allow for keyboard and mouse combinations to be detected?

Things like ctrl/alt/shift +right click, +mouse scroll, mouse movement (maybe perhaps and this is asking a lot, it could support drawn mouse gestures, maybe a baby plugin that integrates with "StrokePlus" (a mouse gesture program) if that is easier, it's not for me, but would maybe be great for newcomers to EG. Maybe also increase it's accessibility for mousey PC users. Some can draw shapes with a mouse better than they can remember/press key combinations.)

I personally could really use the alt+mouse scroll.
P.S. I appreciate the pants off of kgschlosser, in at this point a semi-sexual fashion for improving a plugin, I believe he barely uses himself. I have a favorite 7-button mouse in disrepair, to soon be repaired, but he inspires me to add to cart an 18 button giga-mouse. Just to see if it would work... I could definitely think of uses for that amount of buttons.
justahotbag2
 
Posts: 47
Joined: Fri Jan 27, 2017 8:16 pm

Re: MouseEvent Plugin

Postby kgschlosser » Sat Jul 15, 2017 8:48 pm

@justahotbag2

Holy crap you are asking a lot!.

Yeah I guess I can kick in the key combinations. Tho I am going to have to really play around with it because we do not want it interfering with Windows and in the past this has been a problem of sorts with the Keyboard plugin. But it will give me the opportunity to learn the keyboard side of things.


And unfortunately the Windows API only has concessions for these buttons.

Button 1 (Left)
Button 2 (Right)
Button 3 (Middle/Wheel)
Button 4 (Page Forward)
Button 5 (Page Back)
Wheel Up
Wheel Down
Wheel Left
Wheel Right

So if there are any buttons besides those then their specific use is done through the software the manufacturer provides. But with logitech I would have to reverse engineer the protocol they use and some how end up being a man in the middle between the device and the software. This would take some time of which at the moment i do not have.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2712
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

PreviousNext

Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 3 guests