Eyetracker
 
Loading...
Searching...
No Matches
pygaze._keyboard.basekeyboard.BaseKeyboard Class Reference
Inheritance diagram for pygaze._keyboard.basekeyboard.BaseKeyboard:
pygaze._keyboard.oskeyboard.OSKeyboard pygaze._keyboard.psychopykeyboard.PsychoPyKeyboard pygaze._keyboard.pygamekeyboard.PyGameKeyboard pygaze.keyboard.Keyboard

Public Member Functions

 __init__ (self)
 
 set_keylist (self)
 
 set_timeout (self)
 
 get_key (self)
 

Detailed Description

A keyboard for collecting responses

Constructor & Destructor Documentation

◆ __init__()

pygaze._keyboard.basekeyboard.BaseKeyboard.__init__ ( self)
        Initializes the Keyboard object
        
        arguments

        None
        
        keyword arguments

        keylist --  list of keys that are allowed, e.g. ['1','a','enter']
                    for the 1, A and Enter keys (default =
                    KEYLIST)
        timeout --  time in milliseconds after which None is returned
                    on a call to the get_key method when no keypress is
                    registered (default = KEYTIMEOUT)

Member Function Documentation

◆ get_key()

pygaze._keyboard.basekeyboard.BaseKeyboard.get_key ( self)
        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 in pygaze._keyboard.oskeyboard.OSKeyboard, pygaze._keyboard.psychopykeyboard.PsychoPyKeyboard, and pygaze._keyboard.pygamekeyboard.PyGameKeyboard.

◆ set_keylist()

pygaze._keyboard.basekeyboard.BaseKeyboard.set_keylist ( self)
        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 in pygaze._keyboard.oskeyboard.OSKeyboard, pygaze._keyboard.psychopykeyboard.PsychoPyKeyboard, and pygaze._keyboard.pygamekeyboard.PyGameKeyboard.

◆ set_timeout()

pygaze._keyboard.basekeyboard.BaseKeyboard.set_timeout ( self)
        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 in pygaze._keyboard.oskeyboard.OSKeyboard, pygaze._keyboard.psychopykeyboard.PsychoPyKeyboard, and pygaze._keyboard.pygamekeyboard.PyGameKeyboard.


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