| 819 | } |
| 820 | |
| 821 | int XWindowsKeyState::getEffectiveGroup(KeyCode keycode, int group) const |
| 822 | { |
| 823 | (void)keycode; |
| 824 | #if HAVE_XKB_EXTENSION |
| 825 | // get effective group for key |
| 826 | if (int numGroups = XkbKeyNumGroups(m_xkb, keycode); group >= numGroups) { |
| 827 | unsigned char groupInfo = XkbKeyGroupInfo(m_xkb, keycode); |
| 828 | switch (XkbOutOfRangeGroupAction(groupInfo)) { |
| 829 | case XkbClampIntoRange: |
| 830 | group = numGroups - 1; |
| 831 | break; |
| 832 | |
| 833 | case XkbRedirectIntoRange: |
| 834 | group = XkbOutOfRangeGroupNumber(groupInfo); |
| 835 | if (group >= numGroups) { |
| 836 | group = 0; |
| 837 | } |
| 838 | break; |
| 839 | |
| 840 | default: |
| 841 | // wrap |
| 842 | group %= numGroups; |
| 843 | break; |
| 844 | } |
| 845 | } |
| 846 | #endif |
| 847 | return group; |
| 848 | } |
| 849 | |
| 850 | uint32_t XWindowsKeyState::getGroupFromState(unsigned int state) const |
| 851 | { |
nothing calls this directly
no outgoing calls
no test coverage detected