VirtualBox

Ignore:
Timestamp:
Jun 25, 2010 11:53:48 AM (14 years ago)
Author:
vboxsync
Message:

FE/Common/VBoxKeyboard: fixed a bug which prevented us from understanding X11 keycodes above 63

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/Common/VBoxKeyboard/keyboard.c

    r29654 r30449  
    121121            scan = 0x138;
    122122    }
    123     if (keysym != 0 && scan == 0)
    124             scan = keyc2scan[code];
     123    /* Disabled "keysym != 0" as we can now match keycodes with no keysym */
     124    if (/* keysym != 0 && */ scan == 0)
     125        scan = keyc2scan[code];
    125126
    126127    return scan;
     
    529530                                  sizeof(main_keyboard_type_list)
    530531                                / sizeof(main_keyboard_type_list[0]));
     532#ifdef DEBUG
     533    /* Assertion */
     534    if (sizeof(keyc2scan) != sizeof(main_keyboard_type_scans[cMap]))
     535    {
     536        printf("ERROR: keyc2scan array size doesn't match main_keyboard_type_scans[]!\n");
     537        return 0;
     538    }
     539#endif
    531540    if (cMap >= 0)
    532541    {
    533         memcpy(keyc2scan, main_keyboard_type_scans[cMap], KEYC2SCAN_SIZE);
     542        memcpy(keyc2scan, main_keyboard_type_scans[cMap], sizeof(keyc2scan));
    534543        return 1;
    535544    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette