API Guide Home
(Online version only)

HsKeyCodes.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * Copyright (c) 2004 PalmOne, Inc. or its subsidiaries.
00003  * All rights reserved.
00004  *****************************************************************************/
00005 
00006 /**
00007  *
00008  * @ingroup PmKeyLib
00009  *
00010  */
00011  
00012 /**
00013  * @file    HsKeyCodes.h
00014  * @version 1.0
00015  * @date    
00016  *
00017  *        This file defines the key codes.  These match the vchrs for
00018  *        virtual key characters, but vchars are only used in the legacy
00019  *        event loop.  Everywhere else, they are considered deprecated
00020  *        in favor of key now.  These are NOT ascii, unicode or otherwise
00021  *        although, for standard QWERTY US keboards, the key codes for
00022  *        the letters are the same as the lowercase ASCII values, but
00023  *        only so it's easier to determine what you're looking at.
00024  *
00025  * Note:
00026  *        This is a Palm OS 6 header that we got early in order to make 
00027  *        the Handspring key driver as close as possible to what it
00028  *        should be in the future. This header will be depricated in 
00029  *        favor of Palm's official header once it's in their SDK.
00030  *
00031  */
00032 
00033 #ifndef __KEY_CODES_H__
00034 #define __KEY_CODES_H__
00035 
00036 
00037 /*
00038  *  How are these different from the 5 way jog?
00039  *      chrLeftArrow
00040  *      chrRightArrow
00041  *      chrUpArrow
00042  *      chrDownArrow
00043  */
00044 
00045 /*
00046  *  Keys with a "HS" comment are unique to Handspring
00047  */
00048 
00049 typedef enum {
00050     keyNull                         = 0x0000,
00051     
00052     keyBackspace                    = 0x0008,
00053     keyTab                          = 0x0009,
00054     keyReturn                       = 0x000a,
00055     keyPageUp                       = 0x000b,
00056     keyPageDown                     = 0x000c,
00057     keyNumericEnter                 = 0x000d,
00058     
00059     keyEscape                       = 0x001b,
00060     
00061     keyLeftArrow                    = 0x001c,
00062     keyRightArrow                   = 0x001d,
00063     keyUpArrow                      = 0x001e,
00064     keyDownArrow                    = 0x001f,
00065 
00066     keySpace                        = 0x0020,
00067     
00068     keySingleQuote                  = 0x0027,
00069     keyComma                        = 0x002c,
00070     keyDash                         = 0x002d,
00071     keyPeriod                       = 0x002e,
00072     keySlash                        = 0x002f,
00073     
00074     keyZero                         = 0x0030,
00075     keyOne                          = 0x0031,
00076     keyTwo                          = 0x0032,
00077     keyThree                        = 0x0033,
00078     keyFour                         = 0x0034,
00079     keyFive                         = 0x0035,
00080     keySix                          = 0x0036,
00081     keySeven                        = 0x0037,
00082     keyEight                        = 0x0038,
00083     keyNine                         = 0x0039,
00084     
00085     keySemiColon                    = 0x003b,
00086     keyLessThan                     = 0x003c, // many European keyboards have this key (next to the left shift)
00087     keyEquals                       = 0x003d,
00088     keyAt                           = 0x0040,
00089 
00090     keyOpenBracket                  = 0x005b,
00091     keyBackslash                    = 0x005c,
00092     keyCloseBracket                 = 0x005d,
00093     keyBacktick                     = 0x0060,
00094     
00095     keyA                            = 0x0061,
00096     keyB                            = 0x0062,
00097     keyC                            = 0x0063,
00098     keyD                            = 0x0064,
00099     keyE                            = 0x0065,
00100     keyF                            = 0x0066,
00101     keyG                            = 0x0067,
00102     keyH                            = 0x0068,
00103     keyI                            = 0x0069,
00104     keyJ                            = 0x006a,
00105     keyK                            = 0x006b,
00106     keyL                            = 0x006c,
00107     keyM                            = 0x006d,
00108     keyN                            = 0x006e,
00109     keyO                            = 0x006f,
00110     keyP                            = 0x0070,
00111     keyQ                            = 0x0071,
00112     keyR                            = 0x0072,
00113     keyS                            = 0x0073,
00114     keyT                            = 0x0074,
00115     keyU                            = 0x0075,
00116     keyV                            = 0x0076,
00117     keyW                            = 0x0077,
00118     keyX                            = 0x0078,
00119     keyY                            = 0x0079,
00120     keyZ                            = 0x007a,
00121 
00122     // Some old virtual character codes that can also serve as
00123     // physical key codes for actions.
00124     keyNextField                    = 0x0103,
00125     keyMenu                         = 0x0105,
00126     keyLaunch                       = 0x0108,   // HS
00127     keyFind                         = 0x010A,
00128     keyPrevField                    = 0x010C,
00129     keyLockDevice                   = 0x0112,
00130     
00131     keyThumbWheelUp                 = 0x012E,   // (JogUp)
00132     keyThumbWheelDown               = 0x012F,   // (JogDown)
00133     keyThumbWheelPush               = 0x0130,   // (JogPress)
00134     keyThumbWheelBack               = 0x0131,   // (JogBack)
00135 
00136     keyRockerUp                     = 0x0132,
00137     keyRockerDown                   = 0x0133,
00138     keyRockerLeft                   = 0x0134,
00139     keyRockerRight                  = 0x0135,
00140     keyRockerCenter                 = 0x0136,
00141 
00142     keyHard1                        = 0x0204,
00143     keyHard2                        = 0x0205,
00144     keyHard3                        = 0x0206,
00145     keyHard4                        = 0x0207,
00146 
00147     keyHardPower                    = 0x0208,
00148     keyHardCradle                   = 0x0209,
00149     keyHardCradle2                  = 0x020A,
00150     keyHardContrast                 = 0x020B,
00151     keyHardAntenna                  = 0x020C,
00152     keyHardBrightness               = 0x020D,
00153 
00154     // keyHard 5-10 are for Licensees & Silicon Partners to use.
00155     // That means that this key code might be something totally different on
00156     // a different device.  Be warned.
00157     // (note that values in this range are necessary due to the way
00158     // TxtCharIsHardKey is defined)
00159     keyHard5                        = 0x0214,
00160     keyHard6                        = 0x0215,
00161     keyHard7                        = 0x0216,
00162     keyHard8                        = 0x0217,
00163     keyHard9                        = 0x0218,
00164     keyHard10                       = 0x0219,
00165     keyHard11                       = 0x021A,
00166     keyHard12                       = 0x021B,
00167     keyHard13                       = 0x021C,
00168     keyHard14                       = 0x021D,
00169 
00170     // Handspring specific keys
00171     hsKeyMfgTest                    = 0x1600,   // HS
00172     hsKeySymbol                     = 0x1609,   // HS (Keycap says "Alt")
00173     hsKeyRadioPower                 = 0x160C,   // HS
00174 
00175     // These are keys that are found on standard computer keyboards
00176     // that aren't covered above
00177     
00178     keyLeftShift                    = 0xe000,   // (Handspring shift key)
00179     keyRightShift                   = 0xe001,
00180     keyLeftControl                  = 0xe002,
00181     keyRightControl                 = 0xe003,
00182     keyLeftCommand                  = 0xe004,
00183     keyRightCommand                 = 0xe005,
00184     keyLeftAlt                      = 0xe006,   // (Handspring option key)
00185     keyRightAlt                     = 0xe007,
00186     
00187     keySide                         = 0xe008,   // HS (side button)
00188 
00189     keyHelp                         = 0xe009,
00190     
00191     keyNumLock                      = 0xe00a,
00192     keyScrollLock                   = 0xe00b,
00193     keyCapsLock                     = 0xe00c,
00194 
00195     keyInsert                       = 0xe00d,
00196     keyDelete                       = 0xe00e,
00197     keyHome                         = 0xe00f,
00198     keyEnd                          = 0xe010,
00199     
00200     keyPrintScreen                  = 0xe011,
00201     keyPause                        = 0xe012,
00202     
00203     keyNumericPeriod                = 0xe013,
00204     keyNumericPlus                  = 0xe014,
00205     keyNumericDash                  = 0xe015,
00206     keyNumericAsterisk              = 0xe016,
00207     keyNumericSlash                 = 0xe017,
00208     keyNumericEquals                = 0xe018,
00209     
00210     keyNumericZero                  = 0xe020,
00211     keyNumericOne                   = 0xe021,
00212     keyNumericTwo                   = 0xe022,
00213     keyNumericThree                 = 0xe023,
00214     keyNumericFour                  = 0xe024,
00215     keyNumericFive                  = 0xe025,
00216     keyNumericSix                   = 0xe026,
00217     keyNumericSeven                 = 0xe027,
00218     keyNumericEight                 = 0xe028,
00219     keyNumericNine                  = 0xe029,
00220     
00221     keyF1                           = 0xe031,
00222     keyF2                           = 0xe032,
00223     keyF3                           = 0xe033,
00224     keyF4                           = 0xe034,
00225     keyF5                           = 0xe035,
00226     keyF6                           = 0xe036,
00227     keyF7                           = 0xe037,
00228     keyF8                           = 0xe038,
00229     keyF9                           = 0xe039,
00230     keyF10                          = 0xe03a,
00231     keyF11                          = 0xe03b,
00232     keyF12                          = 0xe03c,
00233     keyF13                          = 0xe03d,
00234     keyF14                          = 0xe03e,
00235     keyF15                          = 0xe03f,
00236 
00237     
00238     // These are multimedia, internet or otherwise interesting buttons
00239     // that are sometimes found on keyboards or devices.
00240     
00241     keyBack                         = 0xe050,
00242     keyForward                      = 0xe051,
00243     keyStopInternet                 = 0xe052,
00244     keyRefresh                      = 0xe053,
00245     keySearch                       = 0xe054,
00246     keyFavorites                    = 0xe055,
00247     keyHomePage                     = 0xe056,
00248 
00249     keyMail                         = 0xe057,
00250 
00251     keyMute                         = 0xe058,
00252     keyVolumeUp                     = 0xe059,
00253     keyVolumeDown                   = 0xe05a,
00254     keyPlay                         = 0xe05b,
00255     keyPauseAudio                   = 0x305c,
00256     keyPlayPause                    = 0xe05d,
00257     keyStopAudio                    = 0xe05e,
00258     keyPrevTrack                    = 0xe05f,
00259     keyNextTrack                    = 0xe060,
00260     keyFastForward                  = 0xe061,
00261     keyRewind                       = 0xe062,
00262     keyEject                        = 0xe063,
00263     
00264     keyMedia                        = 0xe064,
00265 
00266     keyMyComputer                   = 0xe065,
00267     keyMyDocuments                  = 0xe066,
00268     keyMyMusic                      = 0xe067,
00269     keyMyPictures                   = 0xe068,
00270     keyCalculator                   = 0xe069,
00271 
00272     keyLogOff                       = 0xe06a
00273 
00274     
00275 } KeyCodeType;
00276 
00277 #endif  // __KEY_CODES_H__

Top Palm Developer Network
© 2004-2008, Palm, Inc. All rights reserved.
Generated on Fri Jun 13 10:06:53 2008 for Palm API Guide