Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Plugin: MMKeys

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
Elefunty
Posts: 3
Joined: Tue Dec 08, 2009 7:55 pm
Location: Germany

Plugin: MMKeys

Post by Elefunty »

Hi, I'm Elefunty and this is my first post.

I use Eventghost for a while now and I needed something to generate events on multimediakeys pressed. (volume, play/pause,next,previous,stop)
So I decided to write a plugin for doing that ;)
I'm familiar with C++ development but python was new to me, but there's much documentation and I could look in the eventghost files for examples ;)
So I learned python and made a plugin for eventghost.

There is a "Keyboard" plugin shipped with eventghost but that doesn't hook multimedia keys, cause built-in function SetKeyboardCallback (or like that, forgot the exact name :D) doesn't support it. So I built a Dll that provides a WH_KEYBOARD_LL hook. I included the source (written in VC++) for the Dll. (main.c)

Also I wrote an improved HasActiveHandler. The default from core.py doesn't check for wildcards and I wanted one that does ;)

I tested it with EG 0.3.7.r1194 on Windows 7 x64.

I'd be glad if you test it and give comments and report bugs (if any, i don't think so :twisted: :D)
If you want, you can also look into my code, if i made style-mistakes (it's my first plugin).

Ele

P.s. I'm sorry if I wrote some stupid english crap, I'm german.^^
Attachments
Eventghost Plugin MMKeys.zip
(8.28 KiB) Downloaded 215 times
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Plugin: MMKeys

Post by jinxdone »

Umm.. Doesn't the keyboard show up as a HID device?

I have been able to get all the extra buttons on my keyboards to work with the Generic HID plugin so far.

Oh, and welcome to the forums Elefunty! :)
Elefunty
Posts: 3
Joined: Tue Dec 08, 2009 7:55 pm
Location: Germany

Re: Plugin: MMKeys

Post by Elefunty »

Oh man....
Said in different words, I wasted time^^ Or - did I?
Well, at least I learned something.
And the Generic HID doesn't block the keys, my plugin can, that was an important thing for me...

But, thank you for that hint ;)

Ele
Post Reply