View Full Version : Webboard
Vlad
October 13th, 2002, 03:55 PM
Here are some code I wrote to experiment with the multimedia key on the webboard :
LRESULT CALLBACK KeyboardFunc (int nCode, WPARAM wParam, LPARAM lParam )
{
int scancode;
if ( nCode >= 0 ) {
scancode = (int)((lParam >> 16) & 0x01FF);
switch(scancode){
case 0x13b: // Close
return TRUE;
break;
case 0x13c: // Menu
return TRUE;
break;
case 0x13d: // Web
return TRUE;
break;
case 0x13e: // CD
return TRUE;
break;
case 0x13f: // User
return TRUE;
break;
case 0x140: // Prec track
return TRUE;
break;
case 0x141: // Stop
return TRUE;
break;
case 0x142: // Pause
return TRUE;
break;
case 0x143: // Next track
return TRUE;
break;
case 0x144: // Vol-
return TRUE;
break;
case 0x157: // Vol+
return TRUE;
break;
case 0x158: // Mute
return TRUE;
break;
}
}
return( CallNextHookEx(hhookHooks, nCode, wParam, lParam));
}
As you can see these key have the same scancode as F1-F12 keys but with bit 9=
1, if you could include this bit in girder event record we can distinguish the multimedia keys.
Ron
October 13th, 2002, 03:55 PM
Hi Vlad,
Try this new keyboard DLL:
keyboard.dll (http://www.stack.nl/~stilgar/windoze/files/keyboard.dll)
It should now put a 'Z' at the end of the
string if it is an extended key.
Let me know if it worked.
Ron
Yvonus
October 13th, 2002, 03:55 PM
Vladimir and Ron ; I haven't tested it out already but I can already thank you for allowing this new feature in Girder.
A lot of French home theater pc users own such a webboard wireless keyboard along with Girder and this is a very nice add-on for us.
Vlad
October 13th, 2002, 03:55 PM
Sorry but it seems to do nothing...
Vlad
October 13th, 2002, 03:55 PM
I just saw the devel kit and look keyboard.cpp, I will try to patch it and make it work tonight.
Ron
October 13th, 2002, 03:55 PM
Ooops ;)
Well if you get it to work that would be
great!!
Ron
Vlad
October 13th, 2002, 03:55 PM
I made a mistake, it's not bit 9 but bit 24 of lParam ! I made it works now
e=((lParam & (1 << 24)) != 0);
e is true for a extended key and false for
F1-F12. I put a 'Z' at Buffer[6] if e is true, '0' else. Could you put this in your code ?
Ron
October 13th, 2002, 03:55 PM
Hi Vlad,
I've updated the plugin with your code
example,... please check it out ;)
It puts the Z at the 7th place btw :)
keyboard.dll (http://www.stack.nl/~stilgar/windoze/files/keyboard.dll)
Let me know if it works
Ron
Vlad
October 13th, 2002, 03:55 PM
Sorry but it still not work :( Here is the patch I made to keyboard.cpp which works at home :
--- keyboard.cpp.old Sun Oct 22 13:56:26 2000
+++ keyboard.cpp Thu Feb 1 14:28:29 2001
@@ -48,7 +48,7 @@
LRESULT CALLBACK KeyboardProc( int code, WPARAM wParam, LPARAM lParam)
{
- bool b;
+ bool b,e;
BYTE h;
BYTE l;
BYTE o;
@@ -60,6 +60,7 @@
{
+ bool b,e;
BYTE h;
BYTE l;
BYTE o;
@@ -60,6 +60,7 @@
{
b=((lParam & (1 << 31)) == 0);
+ e=((lParam & (1 << 24)) != 0);
if (wParam==VK_CONTROL)
{
control=b;
@@ -152,6 +153,10 @@
Buffer[6]='0';
*/
+ if(e)
+ Buffer[6] = 'Z';
+ else
+ Buffer[6] = '0';
Buffer[7]=0;
Ron
October 13th, 2002, 03:55 PM
Ahh i found my mistake,
Please retry:
Keyboard.dll (http://www.stack.nl/~stilgar/windoze/files/keyboard.dll)
Ron
[Edited by RonB on 02-01-2001 at 03:07 PM GMT]
Yvonus
October 13th, 2002, 03:55 PM
Huhh .. sorry to disappoint everyone but .. you know what I mean ... it doesn't .. you know :)
Fxx key and associated multimedia keys are giving the same learn code in the interface.
Ron, the dll shows off in the plugins menu as 1.0 ... am I sure that I'm using the latest one ? ( I stopped Girder, renamed old keyboard.dll and put the latest one in place)
Vlad
October 13th, 2002, 03:55 PM
I checked not the last one but the previous and it works for me !
It would be good I think to block events from these keys because windows still see them like F1-F12 (like did the webboard tool)
Ron
October 13th, 2002, 03:55 PM
when you press the arrow keys or
"insert", "home" etc etc does
the plugin show a "Z" at the end
of the string ?
These keys all set the extended bit,
if you don't see the "Z" something strange
is happening.
I also marked it version 1.1 so you
can see if you have the new plugin or
not.
keyboard.dll (http://www.stack.nl/~stilgar/windoze/files/keyboard.dll)
Hmmm why is this simple thing giving us so
much headaches ?
Ron
[Edited by RonB on 02-01-2001 at 10:26 PM GMT]
Yvonus
October 13th, 2002, 03:55 PM
Well well .. despite the blocking issue Vladimir, I would expect Girder in learn mode to show me a different learnt code in the lcd-like display.
I've tried with "Close" and "F1" I think and both were learnt as 70000. I was expecting to get a 7000Z for one of those.
Isn't that what I should expect ?
Vlad
October 13th, 2002, 03:55 PM
It's not (F1) 70000 and (Close) 7000Z but 70000Z, I get these code at home. For me it seems to works... What is your keyboard ?
Yvonus
October 13th, 2002, 03:55 PM
I'll try it again. I'll download Ron's latest keyboard.dll which should confirm that I'm not using Girder's original dll.
Webboard are quite difficult to "name". I mean on mine, there is NO brand name on it. Only a reference can be seen IR9703 I think.
Here's a picture that'll show you how it looks like http://yvonus.grolamerz.com/picsHc/ClavierIRPearl.jpg
An Australian reseller on the net sells it if you want additionnal specs. It's also referred to as "IR9703". Period.
We used to call it the "Pearl" keyboard in France because we (in French mailing list) discovered it with a mail-only seller called "PEarl". And this is up to now the only place for us to get one.
http://www.amegroup.com.au/peripheral/kb001.html
Let me know if this is the same as yours. New report this week-end I guess.
Vlad
October 13th, 2002, 03:55 PM
I bought mine webboard also from Pearl in France (because I'm french too :)
Yvonus
October 13th, 2002, 03:55 PM
Gosshhh, it doesn't work :(
I've checked Ron's dll version and it shows the 1.1
Does THIS version of the dll shows also good results Vladimir ?
Can you send me the dll (or test executable, I don't know how you've debugged this) you're using ? (you've got a "send email" next to my name)
Vlad
October 13th, 2002, 03:55 PM
Yes It also works with the 1.1 version (as shown in the configure box, because it is version 1.0 in the plugin list)
Yvonus
October 13th, 2002, 03:55 PM
Ok I guess I have to try on a machine that never saw the keyboard (nor the related software) to figure out if Vladimir's update works fine.
I'll try to do that as soon as I can.
bodziak
October 13th, 2002, 03:55 PM
I explain meaning "driver" - i test 3 diferent models of multimedia keyboards and here are result:
1. one model have kernel drivers mkey.vxd file - the driver must be removed and bundled software also. Special key handling occurs before Girder
2. to of them uses standard keyboard driver but instal keyborad hook dll via registry or in win.ini file so special key handling occurs before Girder
Conclusion: to test if Girder works corectly unistall software bundled with keyboard becourse Girer is last application instalig keyboard hook
Yvonus
October 13th, 2002, 03:55 PM
About blocking multimedia keys .. what's the point ? As it is today, without Vladimir's update to recognize the special bit, those keys are quite useless. Blocking them of having them perform like F keys is the same.
What do you think would be the gain from such a block ?
My whish would be for an update keyboard plugin that would handle multimedia keys separately from the others without having to tweak anything. I hope Vladimir's update will allow that.
Bodziak ; I'm gonna check what keyboard driver has been installed by default.
Done .. recognized as standard 101/102 keys keyboard. I can't remember if I previously installed (but removed later) the keyboard bundled software. Could it still have drivers loading that would interfere with Vladimir's update ?
Ron
October 13th, 2002, 03:55 PM
I can put a special keyboard plugin on
my page for the "webboard" users.
Putting this in the mail dll would be
a mistake i think.
So i'm gonna put that in :)
Send me the code :)
-Ron
Vlad
October 13th, 2002, 03:55 PM
I found how to block multimedia keys from reaching windows (for exemple Close key isn't seen anymore like F1 key by windows)
I just put a if statement at the end of the main function of keyboard.cpp to call the keyboard hook for normal keys and just return TRUE for multimedia keys. Are you interested in puting this in your code ?
Yvonus
October 13th, 2002, 03:55 PM
I did the test and ... it works :)
I've got an additionnal "Z" in the learnt code that appears.
Ron, I guess you can add "ir9703/webboard" to the list of hardware devices supported.
What's next ;
. the "multimedia" keys are still seen by Windows as the copy of the F* keys. Thus, the leftest one still launches "Helps" while Girder learns a "Z" code. This is a "restriction" that should be written somewhere
. another restriction ; previous installation of some keyboard application, especially the bundled webboard software prevents Girder from using those mm keys.
Vladimir you said I found how to block multimedia keys from reaching windows (for exemple
Close key isn't seen anymore like F1 key by windows)
That would clear the first restriction.
Yvonus
October 13th, 2002, 03:55 PM
Updating this post as I've just discovered that I had two "Keyboard" plugins declared !!
In fact, I renamed the keyboard.dll in old_keyboard and download the new with webboard support. Both were activated in fact :(
I cleaned that up and then I got the "Z" codes for those multimedia keys. No issues of previous drivers installed.
That's great.Vladimir talked about blocking the default Windows associated behavior of the leftest keys (help, close ...). That would be the final touch.
Vlad
October 13th, 2002, 03:55 PM
I just post my code and dll to stilgar@stack.nl today
Ron
October 13th, 2002, 03:55 PM
And the file is uploaded
Keyboard.dll (http://www.stack.nl/~stilgar/windoze/files/keyboard_surpressMMkeys.zip)
This is for you webboard owners, Vlad gave a _very_ elegant solution to the problem :)
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.