2009/12/12 James Paige <[email protected]>: > I just noticed an interesting gfx_sdl difference. > > Go into the sprite editor. press Capslock to scroll the sprite with the > arrow keys > > Capslock will act as if it is being held down. Press capslock again (to > turn it off) and then it will act as if you have released it. > > I think this is more correct capslock behavior than what we had before, > although it feels a little awkward. > > Possible solutions: > > * Choose a different key for sprite scrolling > * Show a visual indicator that scrolling mode is active > > --- > James
Yes, SDL has an annoying special case: "The SDLK_CAPSLOCK and SDLK_NUMLOCK keys are special cases and report an SDL_KEYDOWN when first pressed, then an SDL_RELEASED when released and pressed again. For these keys KEYUP and KEYDOWN events are therefore analogous to the state of the caps lock and num lock LEDs rather than the keys themselves. These special cases are required for compatibility with Sun workstations, but may be modified for most users through adjustments around lines 403 and 449 of src/events/SDL_keyboard.c." So I actually had a look at the source, and discovered that SDL disables these special cases if the environmental variable SDL_DISABLE_LOCK_KEYS is set to 1. However, before Oct 10 2009 (and on Debian?), the name of the environment variable was SDL_NO_LOCK_KEYS _______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
