| 789 | } |
| 790 | |
| 791 | KeyModifierMask MSWindowsKeyState::pollActiveModifiers() const |
| 792 | { |
| 793 | KeyModifierMask state = 0; |
| 794 | |
| 795 | // get non-toggle modifiers from our own shadow key state |
| 796 | for (size_t i = 0; i < sizeof(s_modifiers) / sizeof(s_modifiers[0]); ++i) { |
| 797 | KeyButton button = virtualKeyToButton(s_modifiers[i].m_vk); |
| 798 | if (button != 0 && isKeyDown(button)) { |
| 799 | state |= s_modifiers[i].m_mask; |
| 800 | } |
| 801 | } |
| 802 | |
| 803 | // we can get toggle modifiers from the system |
| 804 | if ((GetKeyState(VK_CAPITAL) & 0x01) != 0) { |
| 805 | state |= KeyModifierCapsLock; |
| 806 | } |
| 807 | if ((GetKeyState(VK_NUMLOCK) & 0x01) != 0) { |
| 808 | state |= KeyModifierNumLock; |
| 809 | } |
| 810 | if ((GetKeyState(VK_SCROLL) & 0x01) != 0) { |
| 811 | state |= KeyModifierScrollLock; |
| 812 | } |
| 813 | |
| 814 | return state; |
| 815 | } |
| 816 | |
| 817 | int32_t MSWindowsKeyState::pollActiveGroup() const |
| 818 | { |
nothing calls this directly
no outgoing calls
no test coverage detected