Eyetracker |

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
pygaze._keyboard.psychopykeyboard.PsychoPyKeyboard Class Reference
Inheritance diagram for pygaze._keyboard.psychopykeyboard.PsychoPyKeyboard:

## Public Member Functions
| __init__ (self, keylist=settings.KEYLIST, timeout=settings.KEYTIMEOUT)
| set_keylist (self, keylist=None)
| set_timeout (self, timeout=None)
| get_key (self, keylist='default', timeout='default', flush=False)
Public Member Functions inherited from pygaze._keyboard.basekeyboard.BaseKeyboard
| __init__ (self)

## Public Attributes
dict | keymap
list | klist = None
| timeout = timeout

## Constructor & Destructor Documentation

## ◆ __init__()

pygaze._keyboard.psychopykeyboard.PsychoPyKeyboard.__init__ | ( |  | self,
|  |  | keylist = settings.KEYLIST,
|  |  | timeout = settings.KEYTIMEOUT )

## Member Function Documentation

## ◆ get_key()

pygaze._keyboard.psychopykeyboard.PsychoPyKeyboard.get_key | ( |  | self,
|  |  | keylist = 'default',
|  |  | timeout = 'default',
|  |  | flush = False )

            Wait for keyboard input

            arguments

            None

            keyword arguments

            keylist --  list of keys that are allowed (e.g.
                        ['1','a','enter']), None to allow all keys or
                        'default' to use klist property (default = 'default')
            timeout --  time in milliseconds after which None is returned
                        when no keypress is registered (default = None);
                        None for no timeout or 'default' to use the timeout
                        property (default = 'default')
            flush       --  Boolean indicating if all input from before
                        calling get_key should be ignored, if set to
                        False keypresses from before calling this
                        function will be registered, otherwise every
                        keyboard input from before calling this function
                        will be flushed (default = False)

            returns

            key, presstime  --  key is a string, indicating which button has
                            been pressed or None when no key has been
                            pressed
                            presstime is the time (measured from
                            expbegintime) a keypress or a timeout occured

Reimplemented from pygaze._keyboard.basekeyboard.BaseKeyboard.

## ◆ set_keylist()

pygaze._keyboard.psychopykeyboard.PsychoPyKeyboard.set_keylist | ( |  | self,
|  |  | keylist = None )

            Set a list of accepted keys

            arguments

            None

            keyword arguments

            keylist --  list of keys that are allowed (e.g.
                        ['1','a','enter']) or None to allow all keys
                        (default = None)

            returns

            None        --  sets klist property

Reimplemented from pygaze._keyboard.basekeyboard.BaseKeyboard.

## ◆ set_timeout()

pygaze._keyboard.psychopykeyboard.PsychoPyKeyboard.set_timeout | ( |  | self,
|  |  | timeout = None )

            Set a timeout (in milliseconds)

            arguments

            None

            keyword arguments

            timeout --  time in milliseconds after which None is returned
                        on a call to get_key method when no keypress is
                        registered (default = None)

            returns

            None    --  sets timeout property

Reimplemented from pygaze._keyboard.basekeyboard.BaseKeyboard.

## Member Data Documentation

## ◆ keymap

dict pygaze._keyboard.psychopykeyboard.PsychoPyKeyboard.keymap

Initial value:
= {
'!' : 'exclamation',
'"' : 'doublequote',
'#' : 'hash',
'$' : 'dollar',
'&' : 'ampersand',
'\'' : 'quoteleft',
'(' : None,
')' : None,
'*' : 'asterisk',
'+' : 'plus',
',' : 'comma',
'-' : 'minus',
'.' : None,
'/' : 'slash',
':' : 'colin',
';' : 'semicolon',
'=' : 'equal',
'>' : 'greater',
'?' : 'question',
'@' : 'at',
'[' : 'bracketleft',
'\\' : 'backslash',
']' : 'bracketright',
'^' : None,
'_' : 'underscore'
}

## ◆ klist

list pygaze._keyboard.psychopykeyboard.PsychoPyKeyboard.klist = None

## ◆ timeout

pygaze._keyboard.psychopykeyboard.PsychoPyKeyboard.timeout = timeout

The documentation for this class was generated from the following file:

- C:/Users/lurax/eyetrackingTobii/pygaze/_keyboard/psychopykeyboard.py