Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Webboard

Hybrid View

  1. #1
    Join Date
    Jan 2001
    Posts
    14

    Default

    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.

  2. #2
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    12,079

    Default

    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

  3. #3
    Join Date
    Jan 2001
    Location
    Savigny, France
    Posts
    94

    Default

    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.

  4. #4
    Join Date
    Jan 2001
    Posts
    14

    Default

    Sorry but it seems to do nothing...

  5. #5
    Join Date
    Jan 2001
    Posts
    14

    Default

    I just saw the devel kit and look keyboard.cpp, I will try to patch it and make it work tonight.

  6. #6
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    12,079

    Default

    Ooops

    Well if you get it to work that would be
    great!!

    Ron

  7. #7
    Join Date
    Jan 2001
    Posts
    14

    Default

    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 ?

  8. #8
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    12,079

    Default

    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

  9. #9
    Join Date
    Jan 2001
    Posts
    14

    Default

    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;

  10. #10
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    12,079

    Default

    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
  •