|
.Autodisablecodes Property |
Top Previous Next |
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, Key States and Transitions |
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 on_kp event for a full list of codes). "15" and "20" are key codes. So, the keypad will be disabled (kp.enabled 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_PRESSED)+","+"15"+","+str(PL_KP_EVENT_LONGRELEASED)+","+"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.