Changeset 336


Ignore:
Timestamp:
Sep 30, 2006, 5:39:14 PM (19 years ago)
Author:
pr
Message:

Update keyboard LEDs when setting NumLock state. Bug 831.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1-0/src/helpers/winh.c

    r293 r336  
    1919
    2020/*
    21  *      Copyright (C) 1997-2002 Ulrich M”ller.
     21 *      Copyright (C) 1997-2006 Ulrich M”ller.
    2222 *      This file is part of the "XWorkplace helpers" source package.
    2323 *      This is free software; you can redistribute it and/or modify
     
    47124712 *
    47134713 *@@added V0.9.1 (99-12-18) [umoeller]
     4714 *@@changed V1.0.6 (2006-09-30) [pr]: Set Keyboard LEDs to match @@fixes 831
    47144715 */
    47154716
     
    47474748    {
    47484749        SHIFTSTATE ShiftState;
     4750        USHORT usLEDState;
    47494751        ULONG DataLen = sizeof(SHIFTSTATE);
    47504752
     
    47624764                    &ShiftState, DataLen, &DataLen,
    47634765                    NULL, 0L, NULL);
     4766
     4767        // XWP V1.0.6 (2006-09-30) [pr]: Set Keyboard LEDs to match @@fixes 831
     4768        usLEDState = (ShiftState.fsState & (SCROLLLOCK_ON | NUMLOCK_ON | CAPSLOCK_ON)) >> 4;
     4769        DataLen = sizeof(usLEDState);
     4770        DosDevIOCtl(hKbd, IOCTL_KEYBOARD, KBD_ALTERKBDLED,
     4771                    &usLEDState, DataLen, &DataLen,
     4772                    NULL, 0L, NULL);
     4773
    47644774        // now close OS/2 keyboard driver
    47654775        DosClose(hKbd);
    47664776    }
    4767     return;
    47684777}
    47694778
  • trunk/src/helpers/winh.c

    r292 r336  
    1919
    2020/*
    21  *      Copyright (C) 1997-2002 Ulrich M”ller.
     21 *      Copyright (C) 1997-2006 Ulrich M”ller.
    2222 *      This file is part of the "XWorkplace helpers" source package.
    2323 *      This is free software; you can redistribute it and/or modify
     
    50565056 *
    50575057 *@@added V0.9.1 (99-12-18) [umoeller]
     5058 *@@changed V1.0.6 (2006-09-30) [pr]: Set Keyboard LEDs to match @@fixes 831
    50585059 */
    50595060
     
    50915092    {
    50925093        SHIFTSTATE ShiftState;
     5094        USHORT usLEDState;
    50935095        ULONG DataLen = sizeof(SHIFTSTATE);
    50945096
     
    51055107        DosDevIOCtl(hKbd, IOCTL_KEYBOARD, KBD_SETSHIFTSTATE,
    51065108                    &ShiftState, DataLen, &DataLen,
     5109                    NULL, 0L, NULL);
     5110
     5111        // XWP V1.0.6 (2006-09-30) [pr]: Set Keyboard LEDs to match @@fixes 831
     5112        usLEDState = (ShiftState.fsState & (SCROLLLOCK_ON | NUMLOCK_ON | CAPSLOCK_ON)) >> 4;
     5113        DataLen = sizeof(usLEDState);
     5114        DosDevIOCtl(hKbd, IOCTL_KEYBOARD, KBD_ALTERKBDLED,
     5115                    &usLEDState, DataLen, &DataLen,
    51075116                    NULL, 0L, NULL);
    51085117
Note: See TracChangeset for help on using the changeset viewer.