Jump to content

InputPlugin for Multimedia Keys incl. Sources


erwin

Recommended Posts

Input plugin for multimedia keys on keyboard/mouse/remote control sending WM_APPCOMMAND messages:

 

___________________________________________________

EDIT 20.10.2010 12:15

BugFix for In MultimediaKeys.ini you can disable/enable individual APPCOMMAND.

 

EDIT 19.10.2010 07:00:

Here a version for 64-bit (and for 32 bit. 32-bit-only users can delete the

Multimedia Keys x64 subfolder):

 

Unzip to DVBV_Plugin folder.

MultimediaKeys_32_64.zip

 

In MultimediaKeys.ini you can disable/enable individual APPCOMMAND.

 

 

C++ source (MS Visual Studio 2008)

 

DVBVMultimediaInputPlugin_Source_32_64.zip

 

/EDIT 19.10.2010 07:00:

___________________________________________________

 

MultimediaKeys.zip

 

C++ source (MS Visual Studio 2008)

 

DVBVMultimediaInputPlugin_Source.zip

 

 

Info:

 

http://www.DVBViewer.info/forum/index.php?...st&p=290471

 

erwin

Edited by erwin
  • Like 1
  • Thanks 1
Link to comment
  • 6 months later...

English:

 

Background, function:

 

Nearly every now sold keyboard, mouse or remote control has (special) keys to send APPCOMMAND or VK. Those MultiMedia commands work in the PC very universal and are already included and understood by many players automatically (like WMP, PDVD, TMT, MPC-HC, VLC, Winamp etc.).

 

If these MultiMedia key functions were now integrated also into DVBV everyone, even those who just don't want to be bothered with the incredibly complex world of EventGhost or remote plug-ins could immediately teach the special keys of keyboards or mouses in DVBV and use them..

 

APPCOMMAND is also sent as default by many remotes (shipped with many laptops and PC's) -> the transport keys (Play, Pause, Fwd, Rwd etc.), also Record, CH +/-, Back, More, Vol +/-, Mute and others.

The "MultimediaKeys plugin" is now extending DVBViewer to these commands.

 

 

Quick Start:

 

- unpack the "MultimediaKeys_32_64.zip" into the "Plugins" folder in the program directory of DVBViewer (normally here: C:\Programs\DVBViewer\Plugins)

 

- new start DVBViewer and then in <Settings - Options - Input plugins> there is a new entry: "Multimedia Keys", this hook.

 

Now you can teach the special keys of keyboards or the keys of many remote controls which send APPCOMMAND in DVBViewer in <Settings - Options - Inputs>.

 

 

Focus independence = DVBViewer receives the MultiMedia commands even if another application is "up" which does not use the command.

-> with the new plug-in version you can now communicate throughout 64bit applications per APPCOMMAND with DVBViewer.

 

-> a new ini file acts as a blacklist. If, instead of "= 1", the "= 0" (zero) is typed in, the plugin will no longer handle this APPCOMMAND. So other listening apps will be able to use it.

 

 

 

 

Deutsch:

 

Hintergrund, Funktion:

 

Fast jedes heutzutage verkaufte Keyboard, Maus oder Fernbedienung hat (Sonder)Tasten die APPCOMMAND oder VK senden. Diese MultiMedia-Befehle funktionieren im PC sehr universell bzw. werden u.a. von vielen Playern schon automatisch verstanden (wie WMP, PDVD, TMT, MPC-HC, VLC, Winamp usw.).

 

Wären die MultiMedia Tasten-Funktionen nun auch in DVBV integriert könnte jeder, auch wer gerade keine Lust hat sich mit der unglaublich komplexen Welt von EventGhost oder Fernbedienungs-Plugins herumzuschlagen sofort die Sondertasten seines Keyboards oder Maus in DVBV einlernen und nutzen.

 

APPCOMMAND wird auch per Default von vielen Fernbedienungen (die bei vielen Notebooks und PC's schon dabei ist) gesendet -> die Transporttasten (Play, Pause, Fwd, Rwd usw.), auch Record, CH +/-, Back, More, Vol +/-, Mute u.a.

Das "MultimediaKeys Plugin" erweitert nun DVBViewer um diese Befehle.

 

 

Kurzanleitung:

 

- das "MultimediaKeys_32_64.zip" in den Ordner "Plugins" im Programmverzeichnis vom DVBViewer auspacken (normalerweise hier: C:\Programme\DVBViewer\Plugins)

 

- DVBViewer neu starten und dort in <Einstellungen - Optionen - Eingabeplugins> ist ein neuer Eintrag: "Multimedia Keys", diesen anhaken.

 

Jetzt kann man die Sondertasten von Keyboards oder die Tasten vieler Fernbedienungen die APPCOMMAND senden in DVBViewer in <Einstellungen - Optionen - Eingaben> einlernen.

 

 

Fokus-Unabhängigkeit = DVBViewer empfängt die MultiMedia-Befehle auch dann wenn eine andere Anwendung "oben" ist, die den Befehl nicht verwertet.

-> mit der neuen Plugin-Version kann man nun auch durch 64bit Applikationen hindurch per APPCOMMAND mit DVBViewer kommunizieren.

 

-> neu ist auch eine ini-Datei die als Blacklist fungiert. Wenn man statt "= 1" die "= 0" (Null) einträgt verarbeitet das Plugin diesen APPCOMMAND nicht mehr, so das eventuelle andere Verwerter zum Zuge kommen können.

 

 

EDIT:

nicht mehr zutreffend: (Bei 64bit Versionen von Windows arbeitet das MM-Keys-Plugin nur dann Fokus übergreifend wenn die Anwendung mit Fokus keine 64bit Applikation ist.)

Edited by craig_s
Link to comment

erwin could help me?

 

First, sorry for my English.

 

I have put messages on the forum, but nobody helps me.

 

What I find is how you get to perform the functions and methods that have in the file "DVBViewerPlugin.cpp"

 

For the COM library, I used the "Import Type Library ..." Delphi 7, but I am not able to get the library to manage plugins.

 

Many thanks mate!

Link to comment
  • 2 months later...

Ich hab Win7 Home Premium 64bit und die Meldung nicht. Evl. trifft das (s.o.) auf dich zu?:

 

32-bit-only users can delete the Multimedia Keys x64 subfolder
Link to comment

Ich hab Win7 Home Premium 64bit und die Meldung nicht. Evl. trifft das (s.o.) auf dich zu?:

Jetzt seh ich das selber mit der 64Bit Datei auf meinem eigenen Screenshot. Ich bin wieder zurück zu WinXP. Win7 lies meinen Rechner hin und wieder einfrieren. Mit XP und diesem Plugin, konnte ich die meisten der Tasten zuordnen auf meiner Hama. Aber die Taste Play und Pause haben den selben Code, nämlich "MEDIA_PLAY_PAUSE". Hat da jemand eine Idee? Ebenfalls lässt sich die "i" (infotaste) nicht zuordnen. Die erkennt weder das Plugin hier, noch die showkey.exe. Wenn man die drückt geht das Kontextmenü der gerade im Focus befindlichen Anwendung auf. Hat da jemand eine Lösung für die Hama FB?

 

Fullscreen

post-104079-0-35893400-1293657597_thumb.jpg

Edited by Fullscreen
Link to comment

Aber die Taste Play und Pause haben den selben Code, nämlich "MEDIA_PLAY_PAUSE". Hat da jemand eine Idee? Ebenfalls lässt sich die "i" (infotaste) nicht zuordnen.

Maybe another driver works different for this keys.

 

erwin

Edited by erwin
Link to comment

Maybe another driver works different for this keys.

what do you mean with: "another driver"? The MCE2005 plugin? With the Ghostevent tool this Pause-Play keys working, but only in DVBV. On Windows the Remote is not longer working with installed ghostevent, so i dont like to use that.

 

Fullscreen

Link to comment

what do you mean with: "another driver"?

I mean another version of the driver of your remote (maybe an older one). You wrote that different keys on the remote generate the same event. This is done by the driver - and so maybe another version has another mapping.

 

erwin

Link to comment

I mean another version of the driver of your remote (maybe an older one).

ah tnx, but i have not installed any specialy driver. I just plugin the infrared USB adapter an then i use the remote instantly. The remote is listed in the windows device manager as an HID-Keyboard.

Maybe it is possible to put another appcommand for Play as the "MEDIA_PLAY_PAUSE" ? So i can put this manually in the remote.default

 

Fullscreen

Edited by Fullscreen
Link to comment

The remote is listed in the windows device manager as an HID-Keyboard.

Aha USB_HID.

 

Maybe it is possible to put another appcommand for Play as the "MEDIA_PLAY_PAUSE" ?

No! I think, that Play and Pause keys get the same appcommand MEDIA_PLAY_PAUSE is a "feature" of this remote deep built-in the HID infrastructure. Via google you find that even LINUX user have this issue.

 

There are even more of this double mappings for this remote. The i-key and the right-mouse button are also the same, this time handled by the HID-Mouse device yielding a right click mouse event so that showkeys cannot it recognize as a keyboard key.

 

sorry for this bad news for your remote

 

erwin

Link to comment

sorry for this bad news for your remote

tnx for your explain, but if i use the remote without the Multimedia Keys InputPlugin, the pause, play combination works, also works with ghostevent. I think i try a combination to learn the remote first without the inputplugin and after than with the inputplugin and appcommand. Otherwise i have no idea.

 

Fullscreen

Edited by Fullscreen
Link to comment

but if i use the remote without the Multimedia Keys InputPlugin, the pause, play combination works, also works with ghostevent.

What is in this case the result? An APPCOMMAND, a virtual key? And there is a difference for Play and Pause?

 

erwin

Link to comment
  • 1 month later...

What is in this case the result? An APPCOMMAND, a virtual key? And there is a difference for Play and Pause?

Yes something like that. I use the Multimedia key Plugin with APPCOMMAND for the "Play" key and the default "ch179" for pause. It works.

Attached also my hama.remote config file

 

Fullscreen

post-104079-0-42145100-1297629988_thumb.png

hama.remote.rar

Link to comment
  • 1 month later...

Yes something like that. I use the Multimedia key Plugin with APPCOMMAND for the "Play" key and the default "ch179" for pause.

 

okay.. I installed the "Multimedia Keys" Plugin and I have imported your hama.remote-File. My RemoteKey-Settings are similar to your shown Screenshot. But how can I now activate "Pause"? Which Button on my Hama Remote sends "ch179"?

Edited by viewy
Link to comment

Maybe this small tool will help to see what or if remote (or keyboard) key's send:

ShowKey

 

ch179 is not Pause but MEDIA_PLAY_PAUSE, a "global" command/key. There is a difference to MEDIA_PAUSE that some remotes "normally" send on the Pause button, MEDIA_PAUSE is purely APPCOMMAND. That means, DVBViewer cannot receive it without "Multimedia Keys" Plugin.

 

BUT - if you'd see ch179 instead of MEDIA_PLAY_PAUSE teaching the button to DVBViewer, that would mean "Multimedia Keys" Plugin is not or not correctly installed.

 

What happened in "Fullscreen's" picture above is: he teached the same button once without having the plugin installed and a second time with installed plugin. That's possible to do, whatsoever ;)

 

Should be helpful to read this thread *here*. And if your hama is a RC6 remote you have further more programming possibilities thru registry.

Edited by craig_s
Link to comment

Thanks for your description.

I´ve read your other threads respective the RC6-Registry-Settings. But I am saddly: nowhere on my Remote or Receiver is printed "RC6". Is there a way to configure this (my) remotecontrol by registry-settings?

I have tested the tool "Show Key" (also after double clicking the "CreateTestConfig" and Reboot).

But ShowKey shows by pressing Play, Pause, Skip-for, Skip-back and Stop only "AppCmd WM_APPCOMMAND 14: Play or Pause playback" <-- for example and no KeyID or Mod.

Sorry for my bad english ;) next posts we should make in the german forum!

 

edit: in an other Forum I have read, that the registry-changes will not work with my remote, because the entry in the device manager is an "HID Keyboard Device" and not "Microsoft eHome Infrared Transceiver".

 

Maybe I will buy a new RC6-remote. The possibility to set all buttons in the registriy is really cool :)

DO you have a recommendation, which remote-model I should buy??

Edited by viewy
Link to comment

"AppCmd WM_APPCOMMAND 14: Play or Pause playback" is the ID for an APPCOMMAND: APPCOMMAND_MEDIA_PLAY_PAUSE 14

*here the complete APCOMMAND-List*

 

This shows that your remote does not send a VK_MEDIA_PLAY_PAUSE (Global key, Virtual Key) but an APPCOMMAND for MEDIA_PLAY_PAUSE. But "Multimedia Keys" Plugin will receive them anyway.

 

Normally VK is "better" because more players will understand it, look *here*

*here the complete "Virtual Key" List*

the numeric values are hexadecimal but DVBViewer understands and shows them without installed "Multimedia Keys" Plugin translated in decimal values, here a decimal list (cut out):

 

166 / VK_BROWSER_BACK (A6) 2K/XP Browser Back key

167 / VK_BROWSER_FORWARD (A7) 2K/XP Browser Forward key

168 / VK_BROWSER_REFRESH (A8) 2K/XP Browser Refresh key

169 / VK_BROWSER_STOP (A9) 2K/XP Browser Stop key

170 / VK_BROWSER_SEARCH (AA) 2K/XP Browser Search key

171 / VK_BROWSER_FAVORITES (AB) 2K/XP Browser Favorites key

172 / VK_BROWSER_HOME (AC) 2K/XP Browser Start and Home key

173 / VK_VOLUME_MUTE (AD) 2K/XP Volume Mute key

174 / VK_VOLUME_DOWN (AE) 2K/XP Volume Down key

175 / VK_VOLUME_UP (AF) 2K/XP Volume Up key

176 / VK_MEDIA_NEXT_TRACK (B0) 2K/XP Next Track key

177 / VK_MEDIA_PREV_TRACK (B1) 2K/XP Previous Track key

178 / VK_MEDIA_STOP (B2) 2K/XP Stop Media key

179 / VK_MEDIA_PLAY_PAUSE (B3) 2K/XP Play/Pause Media key

180 / VK_LAUNCH_MAIL (B4) 2K/XP Start Mail key

181 / VK_LAUNCH_MEDIA_SELECT (B5) 2K/XP Select Media key

 

 

...as you can see 179 (ch179) is VK_MEDIA_PLAY_PAUSE

on the other hand APPCOMMAND lists much more MEDIA commands. "Multimedia Keys" Plugin understands both, VK and APPCOMMAND, DVBV without the plugin only VK.

Do not regard the "2K/XP" this all works also in Vista/Win7.

 

 

Before buying a new RC6 maybe you first try how far you get with the Hama ;)?

Edited by craig_s
Link to comment

ah okay. That means, my Remote sends only APPCOMMANDS by pressing Pause, Play, Stop and a few other buttons <--> showkeys shows only the APPCOMMAND ond nothing else - and with uninstalled MultimediaKeysPlugin DVBV don´t recognize an action by teaching one of this keys.

 

Result is, that my DVBV can only receive a command (a translated APPCOMMAND) by pressing Pause (with installed MultimediaKeys). And DVBV receive nothing by pressing Pause, without installed MultimediaKeys (because my remote sends only Appcommands and nothing else by pressing Pause).

So the trick with the ch179 will not work for me?

 

The green "STart"-Button starts the WindowsMCE and ShowKeys shows:

KeyID: 18 (0x12) - VK_MENU

Mod: Alt

<key id="61458" mod="alt">Notification(Key, key id="61458", 3)</key>

 

Is there a way to find the registry-entry to change this VK? for example to start DVBV?

 

@craig_s

thanks for your help.

If you won´t read my bad english, you can answer in the german section and only post a link here... as you want

Edited by viewy
Link to comment

Normally VK is "better" because more players will understand it,

Depends on ...

The MM-Key plugin

1. understands APPCOMMAND

2. no need for focus

 

For VK the app needs the focus to receive the VK

 

 

"Multimedia Keys" Plugin understands both, VK and APPCOMMAND

No. Only APPCOMMAND.

Link to comment

Only APPCOMMAND, ok ok.

I tried all by Showkey recognized as VK, the VK_VOLUME_ and VK_MEDIA_, maybe DVBV translates them somehow for the plugin, dunno, but the plugin does understand them. And no more ch179 but the correct name, whatsoever.

 

So "Multimedia Keys" Plugin understands both, VK and APPCOMMAND is simply easyer to understand without magnifying explanations, OK? ;)

 

 

@ viewy

There's no "trick" - ch179, APPCOMMAND_MEDIA_PLAY_PAUSE and VK_MEDIA_PLAY_PAUSE do exactly the same thing.

 

How to change the function of the green "STart"-Button on the Hama - no idea, sorry. Should be something with the hama.remote config?

Link to comment

P.S. @ Erwin

 

2. no need for focus

For VK the app needs the focus to receive the VK

Sorry but the VK_VOLUME_ and VK_MEDIA_ work as "focus-free" (no need for focus) as APPCOMMAND. I think that's some kind of Windows-mystery? ;)

 

ps.ps.

aha,just tried it - erwin is right but only the MM-Key plugin, and MPC-HC can't do it.

All other players i've tested (VLC-Player, Winamp, WMP, AIMP2) receive the VK commands without focus. Maybe again some "hook-dll" is needed for that?

 

 

One more difference between VK and APPCOMMAND I found out:

nearly all "standard" multimedia keyboards (or mouses) send VK on the Media buttons. APPCOMMAND seems to be more a thing for different kinds of remotes.

Edited by craig_s
Link to comment

Sorry, I have to recant that - just tested two MS Keyboards, they send APPCOMMAND on the Media buttons and MS is standard...

Link to comment
  • 3 years later...

Hi, I'm still a newbie but I have installed the MultiMediakeys files into the plugins directory and 'multimedia keys' is shown as an option in SettinIns/Options/Input/Inputplugins where I have ticked the box to select but the Settings button is greyed out, is this correct? How do I "teach" the keyboard? I'd really like to use this plugin

 

Thankyou

Link to comment

 

but the Settings button is greyed out, is this correct?

 

It's ok. There are no settings for this plugin.

 

How do I "teach" the keyboard? I'd really like to use this plugin

 

Enable this plugin.

 

Go to Options/Input.

'Add' an Action.

Select this Action in the list.

Press 'Learn On'

Press a multimedia key

 

erwin

Link to comment
  • 1 year later...

Hey erwin,

 

still thankfully using your plugin, e.g. every cheap "pipi" mouse wireless or not has forward / back buttons and so may be used as remote, e.g. for favourite +/-.

Just installed successfully on Windows 10 64-bit. Working like a charm! :icecream:

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...