API Guide Home (Online version only) |

# HsKeyTypes.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  * @ingroup PmKeyLib
    00008  *
    00009  */
    00010
    00011 /**
    00012  * @file    HsKeyTypes.h
    00013  *
    00014  * @brief   palmOne's key constant definitions shared by DAL and Palm OS
    00015  * (see Palm OS' CmnKeyTypes.h)
    00016  *
    00017  */
    00018
    00019 #ifndef __HSKEYTYPES_H__
    00020 #define __HSKEYTYPES_H__
    00021
    00022
    00023 /********************************************************************
    00024  * Definition of the Bit numbers corresponding to Palm's key bits
    00025  * (see CmnKeyTypes.h)
    00026  ********************************************************************/
    00027 /** Power key */
    00028 #define keyBitNumPower                   0
    00029 /** Page-up */
    00030 #define keyBitNumPageUp                  1
    00031 /** Page-down */
    00032 #define keyBitNumPageDown                2
    00033 /** App #1 */
    00034 #define keyBitNumHard1                   3
    00035 /** App #2 */
    00036 #define keyBitNumHard2                   4
    00037 /** App #3 */
    00038 #define keyBitNumHard3                   5
    00039 /** App #4 */
    00040 #define keyBitNumHard4                   6
    00041 /** Button on cradle */
    00042 #define keyBitNumCradle                  7
    00043 /** Antenna "key" <chg 3-31-98 RM> */
    00044 #define keyBitNumAntenna                 8
    00045 /** Contrast key */
    00046 #define keyBitNumContrast                9
    00047
    00048
    00049 /** jog wheel up */
    00050 #define keyBitNumJogUp                  12
    00051 /** jog wheel down */
    00052 #define keyBitNumJogDown                13
    00053 /** press/center on jog wheel */
    00054 #define keyBitNumJogPress               14
    00055 /** jog wheel back button */
    00056 #define keyBitNumJogBack                15
    00057 /** 5-way rocker up */
    00058 #define keyBitNumRockerUp               16
    00059 /** 5-way rocker down */
    00060 #define keyBitNumRockerDown             17
    00061 /** 5-way rocker left */
    00062 #define keyBitNumRockerLeft             18
    00063 /** 5-way rocker right */
    00064 #define keyBitNumRockerRight            19
    00065 /** 5-way rocker center/press */
    00066 #define keyBitNumRockerCenter           20
    00067
    00068
    00069 /** Definition of the 1st extension bit field returned in the bit
    00070  *  field array passed into KeyCurrentStateEx.  The following bit
    00071  *  names are based on the American keyboard.
    00072  */
    00073
    00074 /** Q key */
    00075 #define keyBitExt1Q             0x00000001
    00076 #define keyBitNumExt1Q                   0
    00077 /** W key */
    00078 #define keyBitExt1W             0x00000002
    00079 #define keyBitNumExt1W                   1
    00080 /** E key */
    00081 #define keyBitExt1E             0x00000004
    00082 #define keyBitNumExt1E                   2
    00083 /** R key */
    00084 #define keyBitExt1R             0x00000008
    00085 #define keyBitNumExt1R                   3
    00086 /** T key */
    00087 #define keyBitExt1T             0x00000010
    00088 #define keyBitNumExt1T                   4
    00089 /** Y key */
    00090 #define keyBitExt1Y             0x00000020
    00091 #define keyBitNumExt1Y                   5
    00092 /** U key */
    00093 #define keyBitExt1U             0x00000040
    00094 #define keyBitNumExt1U                   6
    00095 /** I key */
    00096 #define keyBitExt1I             0x00000080
    00097 #define keyBitNumExt1I                   7
    00098 /** O key */
    00099 #define keyBitExt1O             0x00000100
    00100 #define keyBitNumExt1O                   8
    00101 /** P key */
    00102 #define keyBitExt1P             0x00000200
    00103 #define keyBitNumExt1P                   9
    00104 /** A key */
    00105 #define keyBitExt1A             0x00000400
    00106 #define keyBitNumExt1A                  10
    00107 /** S key */
    00108 #define keyBitExt1S             0x00000800
    00109 #define keyBitNumExt1S                  11
    00110 /** D key */
    00111 #define keyBitExt1D             0x00001000
    00112 #define keyBitNumExt1D                  12
    00113 /** F key */
    00114 #define keyBitExt1F             0x00002000
    00115 #define keyBitNumExt1F                  13
    00116 /** G key */
    00117 #define keyBitExt1G             0x00004000
    00118 #define keyBitNumExt1G                  14
    00119 /** H key */
    00120 #define keyBitExt1H             0x00008000
    00121 #define keyBitNumExt1H                  15
    00122 /** J key */
    00123 #define keyBitExt1J             0x00010000
    00124 #define keyBitNumExt1J                  16
    00125 /** K key */
    00126 #define keyBitExt1K             0x00020000
    00127 #define keyBitNumExt1K                  17
    00128 /** L key */
    00129 #define keyBitExt1L             0x00040000
    00130 #define keyBitNumExt1L                  18
    00131 /** Backspace key */
    00132 #define keyBitExt1Bksp          0x00080000
    00133 #define keyBitNumExt1Bksp               19
    00134 /** Option key */
    00135 #define keyBitExt1Opt           0x00100000
    00136 #define keyBitNumExt1Opt                20
    00137 /** Z key */
    00138 #define keyBitExt1Z             0x00200000
    00139 #define keyBitNumExt1Z                  21
    00140 /** X key */
    00141 #define keyBitExt1X             0x00400000
    00142 #define keyBitNumExt1X                  22
    00143 /** C key */
    00144 #define keyBitExt1C             0x00800000
    00145 #define keyBitNumExt1C                  23
    00146 /** V key */
    00147 #define keyBitExt1V             0x01000000
    00148 #define keyBitNumExt1V                  24
    00149 /** B key */
    00150 #define keyBitExt1B             0x02000000
    00151 #define keyBitNumExt1B                  25
    00152 /** N key */
    00153 #define keyBitExt1N             0x04000000
    00154 #define keyBitNumExt1N                  26
    00155 /** M key */
    00156 #define keyBitExt1M             0x08000000
    00157 #define keyBitNumExt1M                  27
    00158 /** Period key */
    00159 #define keyBitExt1Period        0x10000000
    00160 #define keyBitNumExt1Period             28
    00161 /** Enter key */
    00162 #define keyBitExt1Enter         0x20000000
    00163 #define keyBitNumExt1Enter              29
    00164 /** Shift key */
    00165 #define keyBitExt1Shift         0x40000000
    00166 #define keyBitNumExt1Shift              30
    00167 /** Space key */
    00168 #define keyBitExt1Space         0x80000000
    00169 #define keyBitNumExt1Space              31
    00170 /** All keys */
    00171 #define keyBitsAllExt1          0xFFFFFFFF
    00172
    00173
    00174 /** Definition of the 2nd extension bit field returned in the bit
    00175  *  field array passed into KeyCurrentStateEx.  The following bit
    00176  *  names are based on the American keyboard.
    00177  */
    00178
    00179 /** Symbol (list type) */
    00180 #define keyBitExt2Symbol        0x00000001
    00181 #define keyBitNumExt2Symbol              0
    00182 /** Cmd/menu */
    00183 #define keyBitExt2CmdMenu       0x00000002
    00184 #define keyBitNumExt2CmdMenu             1
    00185 // OBSOLETE: Treo Jog up
    00186 // #define keyBitExt2JogUp      0x00000004
    00187 // #define keyBitNumExt2JogUp            2
    00188 // OBSOLETE: Treo Jog down
    00189 // #define keyBitExt2JogDown        0x00000008
    00190 // #define keyBitNumExt2JogDown          3
    00191 // OBSOLETE: Treo Jog scan
    00192 // #define keyBitExt2JogScan        0x00000010
    00193 // #define keyBitNumExt2JogScan          4
    00194 /** Launcher */
    00195 #define keyBitExt2Launcher      0x00000020
    00196 #define keyBitNumExt2Launcher            5
    00197 /** UNUSED: Available for use (was going to be RadioPower) */
    00198 #define keyBitExt2Unused6       0x00000040
    00199 #define keyBitNumExt2Unused6             6
    00200 /** Manufacturing Test */
    00201 #define keyBitExt2MfgTest       0x00000080
    00202 #define keyBitNumExt2MfgTest             7
    00203 /** Volume Up */
    00204 #define keyBitExt2VolumeUp      0x00000100
    00205 #define keyBitNumExt2VolumeUp            8
    00206 /** Volume Down */
    00207 #define keyBitExt2VolumeDown    0x00000200
    00208 #define keyBitNumExt2VolumeDown          9
    00209 /** Side button */
    00210 #define keyBitExt2Side          0x00000400
    00211 #define keyBitNumExt2Side               10
    00212 /** Zero key */
    00213 #define keyBitExt2Zero          0x00000800
    00214 #define keyBitNumExt2Zero               11
    00215 /** Right Shift key */
    00216 #define keyBitExt2RShift        0x00001000
    00217 #define keyBitNumExt2RShift             12
    00218 /** Our Phone key */
    00219 #define keyBitExt2Hard11        0x00002000
    00220 #define keyBitNumExt2Hard11             13
    00221 /** All keys */
    00222 #define keyBitsAllExt2          0xFFFFFFFF
    00223
    00224
    00225 /** This keyBit is guaranteed not to map to any character */
    00226 #define keyBitNumUnused         0xFFFF
    00227
    00228
    00229 /********************************************************************
    00230  *Special (impossible) combinations of modifiers that we use
    00231  * to send special events through the key queue
    00232  ********************************************************************/
    00233 #define specialHoldKeyMask    (autoRepeatKeyMask | doubleTapKeyMask)
    00234 #define specialReleaseKeyMask (autoRepeatKeyMask | poweredOnKeyMask)
    00235 #define specialAvail3KeyMask  (doubleTapKeyMask  | poweredOnKeyMask)
    00236 #define specialAvail4KeyMask  (autoRepeatKeyMask | doubleTapKeyMask | poweredOnKeyMask)
    00237
    00238 #define specialKeyMask        (autoRepeatKeyMask | doubleTapKeyMask | poweredOnKeyMask)
    00239
    00240
    00241 /********************************************************************
    00242  *Extended shift state values for supporting an option and option lock state
    00243  ********************************************************************/
    00244 /** Temp shift states (see Graffiti.h) */
    00245 #define hsGrfTempShiftOpt       (grfTempShiftLower+1)
    00246
    00247 /** Local names for shift lock states (see GraffitiShift.h) */
    00248 #define hsGlfOptLock            (glfNumLock << 1)
    00249
    00250 // Treo names (for compatibility)
    00251 //#define keyGrfTempShiftOption hsGrfTempShiftOpt
    00252 //#define keyGlfOptLock         hsGlfOptLock
    00253
    00254 /** Internal shift states (extends GsiShiftStateTag) */
    00255 #define hsGsiOptLock            0xFE
    00256 #define hsGsiShiftOpt           0xFF
    00257
    00258 #endif  // __HSKEYTYPES_H__
    00259
    00260

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