Package libxyz :: Package core :: Module inputwrapper :: Class InputWrapper

[hide private]
[frames] | no frames]

# Class InputWrapper

source code

    object --+
             |
            InputWrapper

Wrap get_input and seek in user-defined keycodes before return keys

Instance Methods | [hide private]

__init__(self, xyz) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code

update(self, data=None) Set/load keycodes data | source code

get(self, allow_empty=False) Get input from screen and search if it matches any user-defined keycodes | source code

_resized_get(self) | source code

_resized_set(self, value) | source code

Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables | [hide private]

| WIN_RESIZE = `'window resize'`
| resized = `property(_resized_get, _resized_set)`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, xyz)
(Constructor)

source code

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
  (inherited documentation)

### update(self, data=None)

source code

Set/load keycodes data

Parameters:
  - `data` (dict) - Keycodes data. If not provided load via get_keys()

### get(self, allow_empty=False)

source code

Get input from screen and search if it matches any user-defined keycodes

Parameters:
  - `allow_empty` - If set return empty list if nothing was typed