PDA

View Full Version : MM Keyboard Emulation



Ron
October 13th, 2002, 12:55 PM
I'm not sure i understand what you mean. Isn't that possible already ?

Ron
October 13th, 2002, 12:55 PM
I think the keyboard uses HID codes, i didn't realise that so many programs are already supported them. If this is the case i'll lookinto including HID support in Girder.

Ron
October 13th, 2002, 12:55 PM
Do you have to install some special software or is it the keyboard that magically does this stuff ?

Ron
October 13th, 2002, 12:55 PM
Hmmm, i wonder if that app has anything to do with it....

Ron
October 13th, 2002, 12:55 PM
If you modify the keyboard.dll plugin it seems possible. But you'd have to find out what keycodes the MM keys have.

Ron
October 13th, 2002, 12:55 PM
Mike,

Its possible to Map the MM keys to ordinary keys like F13 so windows won't do antything with them, and you can program girder to use them!! If anyone is interested email me, i'll send you a solution to this little problem. Webboard users pay attention this is also a possible solution to your problems!!

HappyPixie
October 13th, 2002, 12:55 PM
Hi Ron,

Is it possible to learn IR codes and have Girder emulate the multimedia keys on the Microsoft Internet Keyboard Pro so that if say Windows Media Player was open then the IR code I learn for Play, stop etc gets sent to Windows Media Player but get sent to any other program that also support it.

HappyPixie
October 13th, 2002, 12:55 PM
Hi Ron,

Sorry for the above post, was a wee bit drunk when I wrote it.

Anyway, I bought a new Microsoft Internet keyboard which automatically supports all my multimedia programs once I have opened them. Rather than learning different codes and states for other programs I would like to learn sor example the play button on my remore so then it sends the same command as the play button on the keyboard. If this is already possible any chance of pointing me in the right direction.

Cheers.

John

HappyPixie
October 13th, 2002, 12:55 PM
Thanks for the quick reply Ron.

At present I have Windows Media Player 7, Creative Oozic Player, Creative Playcenter 2.5, ATI DVD, Power DVD 3, Creative DXR3 DVD, Music Match to name but a few and they ALL support my new keyboard.

Talk to soon mate.

John

HappyPixie
October 13th, 2002, 12:55 PM
Hi Ron,

All I installed was the Microsoft Intellitype software that came with the keyboard.

The first time I pressed the media key it scanned my system for applications that were compatible with it.

John

jediperry
October 13th, 2002, 12:55 PM
The MM keys have some functionality without intelitype installed, i forget how well they work though. I have a feeling that the keys that contol winamp etc worked anyway.

Another thought, do you recon it would be possible for girder to intercept the MM keys allowing them to be used to control whatever?
This would be a little more trickey as you would have to stop the origional functionality first.

Cheers,

Mike

[Edited by jediperry on 04-10-2001 at 02:54 PM GMT]

Ionsurge
October 17th, 2002, 09:42 AM
I'm wanting to do the exact thing Pixie is talking about. Most of my keys worked as desired before installing the software from microsoft. I too have an intellitype keyboard, and the media keys work for most of my programs as well. There is a test utility included with the microsoft software, that returns what appears to be hex codes for the key presses, but I'm not sure. Here are a couple multimedia and standard key presses and the resultant codes. I can capture the rest if this will be of any assistance:
Mute (make) 00 20
Mute (break)
Vol- (make) 00 2E
Vol- (break)
Vol+ (make) 00 30
Vol+ (break)
A (make) 00 1E
A (break) 00 1E
B (make) 00 30
B (break) 00 30

Regards on an awesome program,

Ron
October 17th, 2002, 10:32 AM
To remap keys you'll have to look into it your self:

References
http://www.kiss.taihaku.sendai.jp/~fuji/product/scancode.html
http://support.microsoft.com/support/kb/articles/q181/3/48.ASP?LN=JA&SD=SO&FR=0


The first one is in Japaneese, I cannot read it but the examples are more then enough to understand what is going on. Basically this allows you to connect different keys to different functions. ( I think i remember that you'll need to map the keys both way,.. thus if you map A to B, you must also map B to A. )

I've been working on this over a year ago so its a little vague for me too.

christur
October 17th, 2002, 10:19 PM
The MS keyboards are sending WM_APPCOMMAND messages to the foreground application. It's a matter of finding the lparam and wparam for these keys and using that message number. I haven't figured out the correct values yet, but the messages are defined as constants in winuser.h. For instance, a play pause sends the contsant for APPCOMMAND_MEDIA_PLAY_PAUSE. Beyond that I'm lost. There's lots of information at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputmessages/wm_appcommand.asp

Here are some of the sample appcommands:

APPCOMMAND_MEDIA_NEXTTRACK
Go to next track.
APPCOMMAND_MEDIA_PLAY_PAUSE
Play or pause playback.
APPCOMMAND_MEDIA_PREVIOUSTRACK
Go to previous track.
APPCOMMAND_MEDIA_SELECT
Go to Media Select mode.
APPCOMMAND_MEDIA_STOP
Stop playback.

LOTS of apps now support this (some cited above) because when you do, your app just works with all these enhanced keyboards.

It would be great to see girder support these in a more intuituve way.

Chris

Ron
October 17th, 2002, 11:12 PM
That would be useless, you said it yourself, the *foreground* app would get these messages. Girder is not the foreground app 99.9% of the time. So sadly this is not quite usefull to receive events,.. however sending these events is very interesting!!

gamma
October 19th, 2002, 06:30 AM
hi!
im a noob and also very interested in this feature.

but i think i habe to correct christur: to use the media keys of the M$ keybaord the application doen't need to be in foreground! it works allways!

because this way of control works in nearly every programm it would be great for girder to support this!

Ron
October 25th, 2002, 01:42 PM
Next release of Girder will allow capturing and sending of WM_APPCOMMAND!

christur
October 25th, 2002, 09:44 PM
So how do we send these events? I recently intercepted the APPCOMMAND using an app called spyguru, but I can't figure out the correct values to put in the sendmessage plug in.

Here's what I'm looking at. Does the sendmessage plugin want hex, dec? what part of this message?

THANKS!

#M = MSG (Hex or name) W = WParam (Hex) = (Lo, Hi) L = LParam (Hex, Txt) = (Lo, Hi) hWnd = Handle Delay = Delay, s
1M = 0000C02A W = 0000000C = (12, 0) L = 102F0000 = (0, 4143) hWnd = Delay =

Ron
October 25th, 2002, 11:46 PM
Girder captures the APPcommand with the command capture window just like the WM_COMMANDs.

WM_APPCOMMAND = 793. The sendmessage plugin needs base10 decimals numbers.

christur
October 27th, 2002, 03:06 PM
Sorry, but it's not capturing any any of the events. It captures clicks, etc, but somehow misses the appcommands. Oddly, when I use the directional buttons on the remote, it moves the focus around the system wide capture window, so I know events are happening.

This is for windows Media Center, which you should all run out and buy if you haven't already!! ;)

I'm using 3.2.4, is this in 3.2.5?

christur
October 27th, 2002, 07:13 PM
To answer my own question, yes it's in 3.2.5, no it's not in 3.2.4. Now if I could make it work! When I test the event from the capture window, the command works great. When I test the resulting command, nothing happens. I've tried messing with the targeting, any ideas?

THANKS!

Ron
October 27th, 2002, 10:47 PM
no its not in 3.2.5 its in 3.2.6pre5.

christur
October 28th, 2002, 07:33 PM
yep, you're right, sorry my mistake. But I still can't get it to work. When I'm in the capture window, I can press the test event button, and it works fine. When I try it from girder nothing happens! Any ideas?

Thanks!

Ron
October 28th, 2002, 09:55 PM
note: I have not been able to get APP_COMMANDS to work on my system since my keyboard generates broken APP_COMMAND or my software doesn't work with APP_COMMANDS.

Possibly your targetting is off, play around with the target settings.

Gav!
December 3rd, 2002, 03:06 AM
Sorry Ron,

Seems I am having the same problem. Using the latest 3.2.6 release.
:-?

DADA_
December 5th, 2002, 01:13 PM
Hi,
I have Samsung Multimedia keyboard (http://www.sem.samsung.com/product/ca/keyboard/sem4500p.html) and it has similar multimedia keys as Microsoft Keyboards (Play, Stop, Pause ...).

But problem is, that program delivered with it, enables these keys for Samsung "Ugly" Player only. So I can't control Winamp with these keys.

(When I run Winamp and press this Stop key, then Samsung Player starts to run instead of stopping song in Winamp.)

I was trying to use Girder to map these keys to Winamp, but because I'm absolutely newbie in Girder, I was unlucky. What I'm asking is if it is posible to do this.

(Samsung is not delivering such a cute application as IntelliType by Microsoft is so it able to remap 5 unassigned programable keys on this Samsung keyboard.)

lilphil
December 11th, 2002, 08:04 AM
fwiw, there is an application called Hey Mr DJ (www.ewal.net) which has a helper application (and source) to intercept those keys when winamp has window focus, and resend them to the main application. (Which is what I am trying to achieve)
might that help?

lilphil
December 11th, 2002, 12:20 PM
Forget that last post, managed to send a MEDIA_NEXT keypress using
(all in decimal as thats what girder uses, would be nice to have a hex option Ron....)
Message Number: 793
wParam: 262620
lParam: 720896

Used SPYXX from visual studio to find them, wish i understood what they mean a little better... but no time right now. Get the impression one might be the handle of the sending application which could be a bad thing
*whistles*
(PS am i being dopey in assuming Ron hasnt implemented it properly yet in 3.2.6b?)

Ron
December 11th, 2002, 12:31 PM
Thanks for the hint about that application, I'll look into it.


(PS am i being dopey in assuming Ron hasnt implemented it properly yet in 3.2.6b?)
I think I missed your point, what isn't implemented correctly ?

Ron
December 11th, 2002, 12:39 PM
If you are talking about the capturing of APP_COMMANDS, yes that might be broken, my keyboard doesn't have normal MMkeys thus I cannot test that code :(

lilphil
December 11th, 2002, 04:31 PM
From what i understood of the thread I wondered if you were implementing a 'proper' way to send them, but I wasnt sure if thats what was meant.
Im not sure what you mean by capturing of them... If you mean does girder respond to them, then the answer is yes (it did in the last version though as well)
But if you mean does it catch them and prevent them from reaching other apps (which is what I assume you mean) then sadly thats a no :(
If I come accross a spare mm keyboard in my travels ill send it over :D
If I work out a way to do it ill let you know, but ive been keeping my eyes open and fiddled with blocking them before and havnt found anything as of yet. Ended up changing the events to something unused in the registery.
Oh, and if you want me to test anything ill be happy to help. Im using a Logitech Coordless iTouch fwiw

Ron
December 12th, 2002, 02:40 AM
Girder doesn't block the events from going to other apps after catching them.

Kristan
January 26th, 2003, 08:19 PM
I dunno if there is a formal solution now or not. But I figured that this works on my system. Click on the Capture button in the Command Action window, start capturing and press one of the multimedia key on the keyboard. Jot down the LParam number on the first line. Then add a SendMessage action with Message Number 793, wParam 0 and lParam as the one you get in the Capture window.

This should work on Windows Me/2000/XP. I had to use the Send Message plugin though. Because AppCommand actions do not work on my system.

Here are some of the lParams for your information:

Mute - 524288
Volumn down - 589824
Volumn up - 655360
Play / Pause - 917504
Stop - 851968
Previous track - 786432
Next track - 720896

Cheers :D

Kristan
January 26th, 2003, 08:27 PM
Ooops, and you just set "Send to Foreground Task" in the target window.
I use Girder 3.2.7b on Windows XP.

lilphil
February 28th, 2003, 09:13 PM
good work Kristan, this is exactly what I was looking for. Well done
Yes, i know the reply is a bit late.... :)

WiwiJumbo
March 5th, 2003, 02:00 PM
Um hi there.

I'm currently running 3.2.8 and I'm trying to do the same thing.

Only the command doesn't work using either Application Commands or the SendMessage plugin.

What I have been able to get working is Command: WParam 40046 LParam 0

Even tho I have no idea what that really means. :)

What I've been trying before was to map the "Play/Pause" button to either Keyboard or the other Keyboard Driver... neither of which wants that to happen.

Any suggestions?

lilphil
March 5th, 2003, 07:56 PM
Im not quite sure what you are trying to do, and I decided the topic could do with a post in the tips and tricks section. So have a look at this and tell me what you think :)
http://www.girder.nl/phpBB2/viewtopic.php?t=3921

Mav
March 6th, 2003, 10:19 PM
Anyone have any luck with Logitech MM Keyboards? I'm trying to send commands to iTouch, and re-use Logitech's OSD. I can get it to adjust the volume, but the OSD doesn't show up.

Palladium
March 7th, 2003, 12:15 AM
Quoth myself:

Here is a GML file I made. It sends the Message like the regular keys do: to any Listening APP.

http://Www.DmhGames.Ath.Cx/Girder/MultimediaandInternetkeys.zip

If you cant get the file, then I am probably in a game or something and turned off my server to kill some lag.

Enjoy!

Oh, and if you can add any more buttons to it, do it, then send it back to me![/quote]

Mav
March 7th, 2003, 04:23 AM
Yeah that's as far as I got as well... all of the commands work, but none of them trigger Logitech's OSD. I think these commands bypass iTouch altogether, and hit at the system level.

When I press the volume button on my remote, I want it to trigger the same OSD that the volume buttons on my keyboard will trigger.

Palladium
March 7th, 2003, 01:50 PM
Try using the Keys on the keyboard and see if you can capture an Event that actually triggers the OSD.

Mav
March 7th, 2003, 08:46 PM
no dice... the MM keys on my keyboard don't register a code in girder... it's as if they are invisible.

Maybe there are keyboard shortcuts in Itouch, although it's not likely that there are any

Palladium
March 7th, 2003, 11:32 PM
Were you using the keyboard plugin or the command | Capture Window?

Mav
March 13th, 2003, 10:08 PM
thanks for the idea, but no luck there either. :(

subliminal
September 21st, 2003, 02:51 AM
damn.. sweet! kristan you're my hero for the day :p the params you gave work great and i've been looking to get them for so friggin long! :p lemme know if you get any for ffwrd and rew

subliminal
September 21st, 2003, 03:25 AM
Complete reference.. they all seem to work :) http://bcheck.arsware.org/hoekey.htm

Ice
March 8th, 2004, 03:19 AM
Also take a look at http://www.girder.nl/phpBB2/viewtopic.php?p=32145#32145

Promixis
November 4th, 2004, 06:44 PM
The HID plugin will allow control of these keyboards that are HID devices

http://www.promixis.com/download.php?id=637

DigiTalk
December 8th, 2004, 07:40 AM
Hi everyone, hi Ron!

I'm also trying to mimic the MM-Keys of my Logitech iTouch keyboard with my IR-Remote using girder.
It took a while until I figured out how to use the IR receiver, but it works now. Also usual keyboard actions etc. work perfectly.

Now I'm trying to use the IR like Logitech's MM-Keys.
I tried Kristan's solution using SendMessage, but the codes he gave just work with volume up/down and mute. The others don't work.
Capturing also doesn't work. The capture function just gets a message which is sent to WinAmp, and tells me the WinAmp message code and a LParam of 0.

Does anyone know other codes or another possibility?
I'm using Girder 3.3.1 on WinXP SP2, Logitech iTouch 2.22, WinAmp 5.06 and an USB-IR-Receiver which works with the MCERemoe plugin.

<edit>
The HID plugin does the wrong direction for me.
I don't want to capture these events, I want to trigger them myself.
</edit>

Thanx in advance!
DigiTalk

Promixis
December 8th, 2004, 10:45 AM
You want Girder to trigger an iTouch command?

DigiTalk
December 8th, 2004, 11:29 PM
Kind of, yes.

I tried with the codes of Kristan, but that doesn't work.
The useful thing about iTouch is, that it works automatically with most media players.
And I want to use this capability.
But the media keys aren't capturable, and sending the codes to the itouch software won't work, too.

Greetings,
DigiTalk

Promixis
December 9th, 2004, 07:38 AM
I don't think you will be able to have Girder emulate keystrokes for the iTouch software.