Changeset 802 for trunk/src/gui/kernel/qkeymapper_pm.cpp
- Timestamp:
- Oct 20, 2010, 9:39:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qkeymapper_pm.cpp
r668 r802 592 592 state = state ^ Qt::MetaModifier; 593 593 594 595 594 596 // detect numeric keypad keys 595 597 if (chm.vkey == VK_ENTER || chm.vkey == VK_NUMLOCK) { … … 598 600 } else if (((chm.vkey >= VK_PAGEUP && chm.vkey <= VK_DOWN) || 599 601 chm.vkey == VK_INSERT || chm.vkey == VK_DELETE)) { 602 600 603 if ((chm.chr & 0xFF) != 0xE0) { 601 604 state |= Qt::KeypadModifier; … … 608 611 return false; 609 612 } 613 614 615 616 617 618 619 620 621 622 623 624 625 626 610 627 } 611 628 } … … 618 635 // hide the key from Qt (see above) 619 636 return false; 620 } else { 621 // scancode is zero if Numlock is set 622 if (!code) 623 code = Qt::Key_Clear; 624 } 637 } 638 if (state & (Qt::KeyboardModifierMask & ~Qt::KeypadModifier)) { 639 if (!isNumLockOn) { 640 // suppress generation of digits, see above (note that 641 // standard PM applications don't seem to do that for the 642 // "5" key; we correct it here as it seems more logical) 643 chm.chr = 0; 644 chm.fs &= ~KC_CHAR; 645 } 646 } 647 // scancode is zero if Numlock is set 648 if (!code) 649 code = Qt::Key_Clear; 650 // this key doesn't have a virtual key assigned, but pretend we're 651 // a virtual key to avoid interpreting chm.chr as DBCS below 652 chm.fs |= KC_VIRTUALKEY; 625 653 break; 626 654 case 0x37: // *
Note:
See TracChangeset
for help on using the changeset viewer.