-
October 13th, 2002, 03:55 PM
#1
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.
-
October 13th, 2002, 03:55 PM
#2
Hi Vlad,
Try this new keyboard DLL:
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
-
October 13th, 2002, 03:55 PM
#3
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.
-
October 13th, 2002, 03:55 PM
#4
Sorry but it seems to do nothing...
-
October 13th, 2002, 03:55 PM
#5
I just saw the devel kit and look keyboard.cpp, I will try to patch it and make it work tonight.
-
October 13th, 2002, 03:55 PM
#6
Ooops 
Well if you get it to work that would be
great!!
Ron
-
October 13th, 2002, 03:55 PM
#7
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 ?
-
October 13th, 2002, 03:55 PM
#8
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
Let me know if it works
Ron
-
October 13th, 2002, 03:55 PM
#9
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;
-
October 13th, 2002, 03:55 PM
#10
Ahh i found my mistake,
Please retry:
Keyboard.dll
Ron
[Edited by RonB on 02-01-2001 at 03:07 PM GMT]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules