492
Platforms
©2000-2008 Tibbo Technology Inc.
Sub
On
_kp_overflow
lcd.print("WHAT'S THE RUSH? SLOW DOWN!",0,0)
'tell the user
inp_str=""
'clear the string
kp.enabled=YES
're-enable the keypad
End
Sub
8.3.14.5
Properties, Methods, Events
Properties, methods, and events of the kp object.
.Autodisablecodes Property
Function:
Defines which key event/code combinations disable the
keypad.
Type:
String
Value Range:
Up to four comma-separated event/code pairs. Default=
"".
See Also:
Preparing the Keypad for Operation
Details
This property should contain a comma-separated list of event codes and key codes,
for example: "2,15,0,20". In this example, two event/code pairs are set: "2,15"
and "0,20". Event "2" is 2- PL_KP_EVENT_PRESSED, and event "0" is 0-
PL_KP_EVENT_LONGRELEASED (see
event for a full list of codes). "15"
and "20" are key codes. So, the keypad will be disabled (
set to 0-
NO) when the key with code 15 is detected to be "pressed", or the key with code
20 is detected to be "longreleased".
The kp.autodisablecodes string should only contain a list of decimal numbers. That
is, use "2" and not "2- PL_KP_EVENT_PRESSED". Only numerical characters are
processed anyway -- writing "2- PL_KP_EVENT_PRESSED,15,0-
PL_KP_EVENT_LONGRELEASED,20" will set this property to "2,15,0,20" anyway.
You can, of course, write str(PL_KP_EVENT_P","+"15"+","+str
(PL_KP_EVENT_LONGRE","+"20" instead of "2,15,0,20".
This property can only be changed when the keypad is disabled (kp.enabled= 0-
NO). Setting the property to "" means that no event and key combination will
disable the keypad automatically.
.Enabled Property
Function:
Enables or disables the keypad.
Type:
Enum (no_yes, byte)
Value Range:
0- NO (default): The keypad is disabled.
1- YES: The keypad is enabled.
See Also:
Preparing the Keypad for Operation
487
486
494
492
487