PalmOS Key Codes

 
 
This information is meant to be used with the GetLastKey (Satellite Forms standard function) and SetKey (from my SetKey Extension).
 
 
GetLastKey(ASCII_Char, VirtualKeyCode, Modifiers)
SetKey(ASCII_Char, Modifiers)
 
 
ASCII_Char = a number that represents a Palm Character
Modifiers = a number that determines what type of key (standard or "Command"). Modifiers also include shift and control characters that affect other inputs.
 
 
Although I have included a complete list of characters. I have constructed a list of characters of interest:
 
PalmOS Characters of interest
Action
 
Character
 
Modifiers
End String (NULL)
0
0
Backspace
8
0
Line Feed (New Line)
10
0
Delete
127
0
Other ASCII Characters
ASCII Value
0
Power On
256
8
Menu
261
8
Command
262
8
Exit App
264
8
Find
266
8
Calc
267
8
Ronamatic (Graffiti help)
271
8
Pop Up Alpha Keyboard
272
8
Pop Up Numeric Keyboard
273
8
Lock Palm
274
8
Backlight
275
8
AutoOff
276
8
Button 1
516
8
Button 2
517
8
Button 3
518
8
Button 4
519
8
Power off
520
8
Cradle Button
521
8
 Cradle Button 2 (modem sync)
522
8
Contrast Button
523
8
Brightness
525
8

 

 
 

The following key values are valid for either SetKey or GetKey

 
Modifiers
Shift Key 1
Caps Lock 2
Num Lock 4
Command Key 8
Auto-Repeat 40
Power On 100
 
 
Modifiers can be added together. Shift + Caps Lock = 3 This indicates that both Shift and Caps Lock are in effect.
Standard Characters (0 - 127) Modifier 0
chrNull 0
chrStartOfHeading 1
chrStartOfText 2
chrEndOfText 3
chrEndOfTransmission 4
chrEnquiry 5
chrAcknowledge 6
chrBell 7
chrBackspace 8
chrHorizontalTabulation 9
chrLineFeed 10
chrVerticalTabulation 11
chrFormFeed 12
chrCarriageReturn 13
chrShiftOut 14
chrShiftIn 15
chrDataLinkEscape 16
chrDeviceControlOne 17
chrDeviceControlTwo 18
chrDeviceControlThree 19
chrDeviceControlFour 20
chrNegativeAcknowledge 21
chrSynchronousIdle 22
chrEndOfTransmissionBlock 23
chrCancel 24
chrEndOfMedium 25
chrSubstitute 26
chrEscape 27
chrFileSeparator 28
chrGroupSeparator 29
chrRecordSeparator 30
chrUnitSeparator 31
chrSpace 32
chrExclamationMark 33
chrQuotationMark 34
chrNumberSign 35
chrDollarSign 36
chrPercentSign 37
chrAmpersand 38
chrApostrophe 39
chrLeftParenthesis 40
chrRightParenthesis 41
chrAsterisk 42
chrPlusSign 43
chrComma 44
chrHyphenMinus 45
chrFullStop 46
chrSolidus 47
chrDigitZero 48
chrDigitOne 49
chrDigitTwo 50
chrDigitThree 51
chrDigitFour 52
chrDigitFive 53
chrDigitSix 54
chrDigitSeven 55
chrDigitEight 56
chrDigitNine 57
chrColon 58
chrSemicolon 59
chrLessThanSign 60
chrEqualsSign 61
chrGreaterThanSign 62
chrQuestionMark 63
chrCommercialAt 64
chrCapital_A 65
chrCapital_B 66
chrCapital_C 67
chrCapital_D 68
chrCapital_E 69
chrCapital_F 70
chrCapital_G 71
chrCapital_H 72
chrCapital_I 73
chrCapital_J 74
chrCapital_K 75
chrCapital_L 76
chrCapital_M 77
chrCapital_N 78
chrCapital_O 79
chrCapital_P 80
chrCapital_Q 81
chrCapital_R 82
chrCapital_S 83
chrCapital_T 84
chrCapital_U 85
chrCapital_V 86
chrCapital_W 87
chrCapital_X 88
chrCapital_Y 89
chrCapital_Z 90
chrLeftSquareBracket 91
// chrReverseSolidus 92 (not in Japanese fonts)
chrRightSquareBracket 93
chrCircumflexAccent 94
chrLowLine 95
chrGraveAccent 96
chrSmall_A 97
chrSmall_B 98
chrSmall_C 99
chrSmall_D 100
chrSmall_E 101
chrSmall_F 102
chrSmall_G 103
chrSmall_H 104
chrSmall_I 105
chrSmall_J 106
chrSmall_K 107
chrSmall_L 108
chrSmall_M 109
chrSmall_N 110
chrSmall_O 111
chrSmall_P 112
chrSmall_Q 113
chrSmall_R 114
chrSmall_S 115
chrSmall_T 116
chrSmall_U 117
chrSmall_V 118
chrSmall_W 119
chrSmall_X 120
chrSmall_Y 121
chrSmall_Z 122
chrLeftCurlyBracket 123
chrVerticalLine 124
chrRightCurlyBracket 125
chrTilde 126
chrDelete 127
 
 
Virtual Characters (>257) Modifier 8
 
vchrLowBattery 257 Display low battery dialog
vchrEnterDebugger 258 Enter Debugger
vchrNextField 259 Go to next field in form
vchrStartConsole 260 Startup console task
vchrMenu 261 Bring up the menu
vchrCommand 262 Bring up commands such as Copy and paste
vchrConfirm 263
vchrLaunch 264 Return to Launcher
vchrKeyboard 265 popup the keyboard in appropriate mode
vchrFind 266
vchrCalc 267
vchrPrevField 268
vchrAlarm 269 sent before displaying an alarm
vchrRonamatic 270 stroke from graffiti area to top half of screen
vchrGraffitiReference 271 popup the Graffiti reference
vchrKeyboardAlpha 272 popup the keyboard in alpha mode
vchrKeyboardNumeric 273 popup the keyboard in number mode
vchrLock 274 switch to the Security app and lock the device
vchrBacklight 275 toggle state of backlight
vchrAutoOff 276 power off due to inactivity timer
 
Added for PalmOS 3.0
vchrExgTest 277 put exchange Manager into test mode (&.t)
vchrSendData 278 Send data if possible
vchrIrReceive 279 Initiate an Ir receive manually (&.i)
 
Added for PalmOS 3.1
vchrTsm1 280 Text Services silk-screen button
vchrTsm2 281 Text Services silk-screen button
vchrTsm3 282 Text Services silk-screen button
vchrTsm4 283 Text Services silk-screen button
 
Added for PalmOS 3.2
vchrRadioCoverageOK 284 Radio coverage check successful
vchrRadioCoverageFail 285 Radio coverage check failure
vchrPowerOff 286 Posted after autoOffChr or hardPowerChr
 
Added for PalmOS 3.5
vchrResumeSleep 287 Posted by NotifyMgr clients after they have deferred a sleep request in order to resume it.
vchrLateWakeup 288 Posted by the system after waking up to broadcast a late wakeup notification. FOR SYSTEM USE ONLY
vchrTsmMode 289 Posted by TSM to trigger mode change.
vchrBrightness 290 Activates brightness adjust dialog
vchrContrast 291 Activates contrast adjust dialog
vchrExpCardInserted 292 ExpansionMgr card inserted & removed.
vchrExpCardRemoved 293 NOTE: these keys will never show up in an app's event loop (they are caught inside EvtGetEvent()), and will probably be deprecated soon (see comments in ExpansionMgr.c).
vchrExgIntData 511 Exchange Manager wakeup event
 
Added for PalmOS 4.0
vchrAttnStateChanged 294 Posted by AttentionMgr API to open or update dialog
vchrAttnUnsnooze 295 Posted when AttentionMgr snooze timer expires
vchrAttnIndicatorTapped 0x0128 296 Posted when AttentionIndicator is tapped
vchrAttnAllowClose 297 Posted when AttnAllowClose is called
vchrAttnReopen 298 Posted when AttnReopen is called
vchrCardCloseMenu 299 Posted when a card is inserted
vchrIrGotData 300 Posted when IR Receiveinitiated and copying of an app is imminent
 
Application Launching Buttons
vchrHardKeyMin 512
vchrHardKeyMax 767 256 hard keys
vchrHard1 516
vchrHard2 517
vchrHard3 518
vchrHard4 519
vchrHardPower 520
vchrHardCradle 521 Button on cradle pressed vchrHardCradle2 522 Button on cradle pressed and hwrDockInGeneric1 input on dock asserted (low).
vchrHardContrast 523 Sumo's Contrast button
vchrHardAntenna 524 Eleven's Antenna switch
vchrHardBrightness 525 Hypothetical Brightness button
vchrPageUpWhenOff 526 The m100 device's page-up clock button
vchrHardEarbud 527 Hypothetical Earbud button
 

Hardware Specific Buttons

The following keycode RANGES are reserved for use by licensees. All use modifier = 8.
Note that ranges include the Min and Max values themselves (i.e. key codes >= min and <= max are assigned to the following licensees).
Qualcomm
vchrThumperMin 768
vchrThumperMax 1023 256 command keys
Motorola
vchrCessnaMin 5325
vchrCessnaMax 5325 1 command key
TRG
vchrCFlashMin 5376
vchrCFlashMax 5391 16 command keys
 
Symbol
vchrSPTMin 5536
vchrSPTMax 5551 16 command keys
Handspring
vchrSlinkyMin 5632
vchrSlinkyMax 5887 256 command keys
Palm
vchrPalmMin 5888
vchrPalmMax 6143 256 command keys