Mercurial > sdl-ios-xcode
view src/events/scancodes_darwin.h @ 5067:61d53410eb41
Fixed bug #859
CREATE_SUBDIRS helps a lot if browsing HTML documentation in a file browser.
ALWAYS_DETAILED_SEC makes sure everything has at least the automatic
documentation like function prototype and source references.
STRIP_FROM_PATH allows you to include only the relevant portions of the files'
paths, cleaning up both the file list and directory tree, though you need to
change the path listed here to match wherever you put SDL.
ALIASES avoids some warnings generated by
C:\source\svn.libsdl.org\trunk\SDL\src\joystick\darwin\10.3.9-FIX\IOHIDLib.h.
It seems Apple uses a few commands which are not normally supported by Doxygen.
BUILTIN_STL_SUPPORT adds support for parsing code which makes use of the
standard template library. There isn't a lot of C++ in SDL (some in bwindow at
least), but this still seems like a good idea.
TYPEDEF_HIDES_STRUCT means that for code like this:
typedef struct A {int B;} C;
C is documented as a structure containing B instead of a typedef mapped to A.
EXTRACT_ALL, EXTRACT_PRIVATE, EXTRACT_STATIC, EXTRACT_LOCAL_METHODS,
EXTRACT_ANON_NSPACES and INTERNAL_DOCS make sure that _everything_ is
documented.
CASE_SENSE_NAMES = NO avoids potential conflicts when building documentation on
case insensitive file systems like NTFS and FAT32.
WARN_NO_PARAMDOC lets you know when you have documented some, but not all, of
the parameters of a function. This is useful when you're working on adding
such documentation since it makes partially documented functions easier to
spot.
WARN_LOGFILE writes warnings to a seperate file instead of mixing them in with
stdout. When not running in quiet mode, these warnings can be hard to spot
without this flag.
I added *.h.in and *.h.default to FILE_PATTERNS to generate documentation for
config.h.in and config.h.default.
RECURSIVE tells doxygen to look not only in the input directory, but also in
subfolders.
EXCLUDE avoids documenting things like test programs, examples and templates
which need to be documented separately.
I've used EXCLUDE_PATTERNS to exclude non-source subdirectories that often find
their way into source folders (such as obj or .svn).
EXAMPLE_PATH lists directories doxygen will search to find included example
code. So far, SDL doesn't really use this feature, but I've listed some likely
locations.
SOURCE_BROWSER adds syntax highlighted source code to the HTML output.
USE_HTAGS is nice, but not available on Windows.
INLINE_SOURCES adds the body of a function to it's documentation so you can
quickly see exactly what it does.
ALPHABETICAL_INDEX generates an alphabetical list of all structures, functions,
etc., which makes it much easier to find what you're looking for.
IGNORE_PREFIX skips the SDL_ prefix when deciding which index page to place an
item on so you don't have everything show up under "S".
HTML_DYNAMIC_SECTIONS hides the includes/included by diagrams by default and
adds JavaScript to allow the user to show and hide them by clicking a link.
ENUM_VALUES_PER_LINE = 1 makes enums easier to read by placing each value on
it's own line.
GENERATE_TREEVIEW produces a two frame index page with a navigation tree on the
left.
I have LaTeX and man pages turned off to speed up doxygen, you may want to turn
them back on yourself.
I added _WIN32=1 to PREDEFINED to cause SDL to output documentation related to
Win32 builds of SDL. Normally, doxygen gets confused since there are multiple
definitions for various structures and formats that vary by platform. Without
this doxygen can produce broken documentation or, if you're lucky, output
documentation only for the dummy drivers, which isn't very useful. You need to
pick a platform.
GENERATE_TAGFILE produces a file which can be used to link other doxygen
documentation to the SDL documentation.
CLASS_DIAGRAMS turns on class diagrams even when dot is not available.
HAVE_DOT tells doxygen to try to use dot to generate diagrams.
TEMPLATE_RELATIONS and INCLUDE_GRAPH add additional diagrams to the
documentation.
DOT_MULTI_TARGETS speeds up dot.
OUTPUT_DIRECTORY, INPUT and other paths reflect the fact that this Doxyfile is
intended to process src as well as include and is being run from a separate
subdirectory. Doxygen produces several temporary files while it's running and
if interrupted, can leave those files behind. It's easier to clean up if there
aren't a hundred or so files in the same folder. I typically run doxygen in
SDL/doxy and set the output directory to '.'. Since doxygen puts it's output
in subfolders by type, this keeps things pretty well organised. You could use
'../doc' instead and get the same results.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 21 Jan 2011 12:57:01 -0800 |
parents | f7b03b6838cb |
children | 25d4feb7c127 |
line wrap: on
line source
/* SDL - Simple DirectMedia Layer Copyright (C) 1997-2010 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Sam Lantinga slouken@libsdl.org */ /* Mac virtual key code to SDL scancode mapping table Sources: - Inside Macintosh: Text <http://developer.apple.com/documentation/mac/Text/Text-571.html> - Apple USB keyboard driver source <http://darwinsource.opendarwin.org/10.4.6.ppc/IOHIDFamily-172.8/IOHIDFamily/Cosmo_USB2ADB.c> - experimentation on various ADB and USB ISO keyboards and one ADB ANSI keyboard */ /* *INDENT-OFF* */ static const SDL_scancode darwin_scancode_table[] = { /* 0 */ SDL_SCANCODE_A, /* 1 */ SDL_SCANCODE_S, /* 2 */ SDL_SCANCODE_D, /* 3 */ SDL_SCANCODE_F, /* 4 */ SDL_SCANCODE_H, /* 5 */ SDL_SCANCODE_G, /* 6 */ SDL_SCANCODE_Z, /* 7 */ SDL_SCANCODE_X, /* 8 */ SDL_SCANCODE_C, /* 9 */ SDL_SCANCODE_V, /* 10 */ SDL_SCANCODE_NONUSBACKSLASH, /* SDL_SCANCODE_NONUSBACKSLASH on ANSI and JIS keyboards (if this key would exist there), SDL_SCANCODE_GRAVE on ISO. (The USB keyboard driver actually translates these usage codes to different virtual key codes depending on whether the keyboard is ISO/ANSI/JIS. That's why you have to help it identify the keyboard type when you plug in a PC USB keyboard. It's a historical thing - ADB keyboards are wired this way.) */ /* 11 */ SDL_SCANCODE_B, /* 12 */ SDL_SCANCODE_Q, /* 13 */ SDL_SCANCODE_W, /* 14 */ SDL_SCANCODE_E, /* 15 */ SDL_SCANCODE_R, /* 16 */ SDL_SCANCODE_Y, /* 17 */ SDL_SCANCODE_T, /* 18 */ SDL_SCANCODE_1, /* 19 */ SDL_SCANCODE_2, /* 20 */ SDL_SCANCODE_3, /* 21 */ SDL_SCANCODE_4, /* 22 */ SDL_SCANCODE_6, /* 23 */ SDL_SCANCODE_5, /* 24 */ SDL_SCANCODE_EQUALS, /* 25 */ SDL_SCANCODE_9, /* 26 */ SDL_SCANCODE_7, /* 27 */ SDL_SCANCODE_MINUS, /* 28 */ SDL_SCANCODE_8, /* 29 */ SDL_SCANCODE_0, /* 30 */ SDL_SCANCODE_RIGHTBRACKET, /* 31 */ SDL_SCANCODE_O, /* 32 */ SDL_SCANCODE_U, /* 33 */ SDL_SCANCODE_LEFTBRACKET, /* 34 */ SDL_SCANCODE_I, /* 35 */ SDL_SCANCODE_P, /* 36 */ SDL_SCANCODE_RETURN, /* 37 */ SDL_SCANCODE_L, /* 38 */ SDL_SCANCODE_J, /* 39 */ SDL_SCANCODE_APOSTROPHE, /* 40 */ SDL_SCANCODE_K, /* 41 */ SDL_SCANCODE_SEMICOLON, /* 42 */ SDL_SCANCODE_BACKSLASH, /* 43 */ SDL_SCANCODE_COMMA, /* 44 */ SDL_SCANCODE_SLASH, /* 45 */ SDL_SCANCODE_N, /* 46 */ SDL_SCANCODE_M, /* 47 */ SDL_SCANCODE_PERIOD, /* 48 */ SDL_SCANCODE_TAB, /* 49 */ SDL_SCANCODE_SPACE, /* 50 */ SDL_SCANCODE_GRAVE, /* SDL_SCANCODE_GRAVE on ANSI and JIS keyboards, SDL_SCANCODE_NONUSBACKSLASH on ISO (see comment about virtual key code 10 above) */ /* 51 */ SDL_SCANCODE_BACKSPACE, /* 52 */ SDL_SCANCODE_KP_ENTER, /* keyboard enter on portables */ /* 53 */ SDL_SCANCODE_ESCAPE, /* 54 */ SDL_SCANCODE_RGUI, /* 55 */ SDL_SCANCODE_LGUI, /* 56 */ SDL_SCANCODE_LSHIFT, /* 57 */ SDL_SCANCODE_CAPSLOCK, /* 58 */ SDL_SCANCODE_LALT, /* 59 */ SDL_SCANCODE_LCTRL, /* 60 */ SDL_SCANCODE_RSHIFT, /* 61 */ SDL_SCANCODE_RALT, /* 62 */ SDL_SCANCODE_RCTRL, /* 63 */ SDL_SCANCODE_RGUI, /* fn on portables, acts as a hardware-level modifier already, so we don't generate events for it, also XK_Meta_R */ /* 64 */ SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */ /* 65 */ SDL_SCANCODE_KP_PERIOD, /* 66 */ SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */ /* 67 */ SDL_SCANCODE_KP_MULTIPLY, /* 68 */ SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */ /* 69 */ SDL_SCANCODE_KP_PLUS, /* 70 */ SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */ /* 71 */ SDL_SCANCODE_NUMLOCKCLEAR, /* 72 */ SDL_SCANCODE_VOLUMEUP, /* 73 */ SDL_SCANCODE_VOLUMEDOWN, /* 74 */ SDL_SCANCODE_MUTE, /* 75 */ SDL_SCANCODE_KP_DIVIDE, /* 76 */ SDL_SCANCODE_KP_ENTER, /* keypad enter on external keyboards, fn-return on portables */ /* 77 */ SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */ /* 78 */ SDL_SCANCODE_KP_MINUS, /* 79 */ SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */ /* 80 */ SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */ /* 81 */ SDL_SCANCODE_KP_EQUALS, /* 82 */ SDL_SCANCODE_KP_0, /* 83 */ SDL_SCANCODE_KP_1, /* 84 */ SDL_SCANCODE_KP_2, /* 85 */ SDL_SCANCODE_KP_3, /* 86 */ SDL_SCANCODE_KP_4, /* 87 */ SDL_SCANCODE_KP_5, /* 88 */ SDL_SCANCODE_KP_6, /* 89 */ SDL_SCANCODE_KP_7, /* 90 */ SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */ /* 91 */ SDL_SCANCODE_KP_8, /* 92 */ SDL_SCANCODE_KP_9, /* 93 */ SDL_SCANCODE_INTERNATIONAL3, /* Cosmo_USB2ADB.c says "Yen (JIS)" */ /* 94 */ SDL_SCANCODE_INTERNATIONAL1, /* Cosmo_USB2ADB.c says "Ro (JIS)" */ /* 95 */ SDL_SCANCODE_KP_COMMA, /* Cosmo_USB2ADB.c says ", JIS only" */ /* 96 */ SDL_SCANCODE_F5, /* 97 */ SDL_SCANCODE_F6, /* 98 */ SDL_SCANCODE_F7, /* 99 */ SDL_SCANCODE_F3, /* 100 */ SDL_SCANCODE_F8, /* 101 */ SDL_SCANCODE_F9, /* 102 */ SDL_SCANCODE_LANG2, /* Cosmo_USB2ADB.c says "Eisu" */ /* 103 */ SDL_SCANCODE_F11, /* 104 */ SDL_SCANCODE_LANG1, /* Cosmo_USB2ADB.c says "Kana" */ /* 105 */ SDL_SCANCODE_PRINTSCREEN, /* On ADB keyboards, this key is labeled "F13/print screen". Problem: USB has different usage codes for these two functions. On Apple USB keyboards, the key is labeled "F13" and sends the F13 usage code (SDL_SCANCODE_F13). I decided to use SDL_SCANCODE_PRINTSCREEN here nevertheless since SDL applications are more likely to assume the presence of a print screen key than an F13 key. */ /* 106 */ SDL_SCANCODE_F16, /* 107 */ SDL_SCANCODE_SCROLLLOCK, /* F14/scroll lock, see comment about F13/print screen above */ /* 108 */ SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */ /* 109 */ SDL_SCANCODE_F10, /* 110 */ SDL_SCANCODE_APPLICATION, /* windows contextual menu key, fn-enter on portables */ /* 111 */ SDL_SCANCODE_F12, /* 112 */ SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */ /* 113 */ SDL_SCANCODE_PAUSE, /* F15/pause, see comment about F13/print screen above */ /* 114 */ SDL_SCANCODE_INSERT, /* the key is actually labeled "help" on Apple keyboards, and works as such in Mac OS, but it sends the "insert" usage code even on Apple USB keyboards */ /* 115 */ SDL_SCANCODE_HOME, /* 116 */ SDL_SCANCODE_PAGEUP, /* 117 */ SDL_SCANCODE_DELETE, /* 118 */ SDL_SCANCODE_F4, /* 119 */ SDL_SCANCODE_END, /* 120 */ SDL_SCANCODE_F2, /* 121 */ SDL_SCANCODE_PAGEDOWN, /* 122 */ SDL_SCANCODE_F1, /* 123 */ SDL_SCANCODE_LEFT, /* 124 */ SDL_SCANCODE_RIGHT, /* 125 */ SDL_SCANCODE_DOWN, /* 126 */ SDL_SCANCODE_UP, /* 127 */ SDL_SCANCODE_POWER }; /* *INDENT-ON* */