Action
Source code in pzp/actions.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
__init__(action, keys=None)
Action decorator
Parameters:
Name | Type | Description | Default |
---|---|---|---|
action |
str
|
Action |
required |
Source code in pzp/actions.py
17 18 19 20 21 22 23 24 25 |
|
ActionsHandler
Source code in pzp/actions.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
__init__(keys_handler=None, keys_binding=None)
Action handler
Parameters:
Name | Type | Description | Default |
---|---|---|---|
keys_handler |
Optional[KeysHandler]
|
Keys handler |
None
|
keys_binding |
Optional[KeysBinding]
|
Optional[Dict[str, Sequence[str]]] = None, |
None
|
Attributes:
Name | Type | Description |
---|---|---|
actions |
map action names to action handlers |
|
keys_handler |
Keys handler |
Source code in pzp/actions.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
|
process_key_event(key_event)
Execute the action hander for a give key event
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key_event |
KeyEvent
|
Key event to be processed |
required |
Raises:
Type | Description |
---|---|
MissingHander
|
If there is no handler for the given key event |
Source code in pzp/actions.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|