Page 1 of 1

Plugin: MMKeys

Posted: Tue Dec 08, 2009 8:48 pm
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.^^

Re: Plugin: MMKeys

Posted: Tue Dec 08, 2009 10:48 pm
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! :)

Re: Plugin: MMKeys

Posted: Tue Dec 08, 2009 11:27 pm
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