.autodisablecodes Property

Function:

Defines what key event + key code combinations disable the keypad (set kp.enabled = 0 — NO).

Type:

String

Value Range:

Up to four comma-separated event/code pairs (default = "").

See Also:

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, the two event/code pairs are "2,15" and "0,20." Event "2" is 2 — PL_KP_EVENT_PRESSED and event "0" is 0 — PL_KP_EVENT_LONGRELEASED. Meanwhile, "15" and "20" are key codes. So, the keypad will be disabled 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." You can, of course, use the following way to set kp.autodisablecodes:

kp.autodisablecodes = str(PL_KP_EVENT_PRESSED)+","+"15"+","+str(PL_KP_EVENT_LONGRELEASED)+","+"20"

This property can only be changed when the keypad is disabled (kp.enabled = 0 — NO).


.autodisablecodes Property

Details