We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2285

Summary: SDLK keycodes mentioned in documentation but not defined in source
Product: SDL Reporter: nate
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: gabomdq
Version: 2.0.1   
Hardware: All   
OS: All   

Description nate 2013-12-05 06:39:21 UTC
In the documentation a few SDLK_ macros are mentioned that are not defined in the SDL headers. On http://wiki.libsdl.org/SDL_Keycode it talks about the keycodes for ` being SDLK_GRAVE and for ' being SDLK_APOSTROPHE. However when I tried to write a program that used SDLK_GRAVE and SDLK_APOSTROPHE, I got a bunch of errors about how they were not defined. After this I grepped for both of these terms in all the SDL2 header files, and neither definition was present in any of the files.

I'm not sure if this is a bug in the documentaion or the source, but the two are not in sync. If it is a documentation problem, I would like to know the correct way of detecting key events for the ` and ' keys.

I chose All for OS and Hardware because this doesn't seem like a system dependent issue as the missing macros would be present in the headers for all platforms.
Comment 1 nate 2013-12-05 06:56:50 UTC
After digging around in the headers a bit, I found that the SDLK associated with ` should be SDLK_BACKQUOTE and for ' should be SDL_QUOTE. So then the problem is with the documentation on that specific page, and NOT in the header source code files.

Of course I would find this out right after filing the bug report, isn't that how it goes? Nevertheless, I hope the report will be useful to others who had the same bit of confusion as me, and that that documentation page will be updated.
Comment 2 Gabriel Jacobo 2013-12-05 12:52:07 UTC
Thanks! I fixed the wiki.