| Summary: | switching CAPS and NUM does not work. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Andrey <public.irkutsk> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.1 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
. setxkbmap fault |
In the current version of the code, switching the state for the CAPS and NUM buttons occurs when the button is pressed, and when the button is released, this state is reset. [code] if (SDL_KEYDOWN == type) { switch (keycode) { case SDLK_NUMLOCKCLEAR: keyboard->modstate ^= KMOD_NUM; break; case SDLK_CAPSLOCK: keyboard->modstate ^= KMOD_CAPS; break; default: keyboard->modstate |= modifier; break; } } else { // CAPS keyup reset state keyboard->modstate &= ~modifier; } [/code]