Eyetracker |

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

## 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=u 'default', timeout=u 'default', flush=False)
Public Member Functions inherited from pygaze._keyboard.basekeyboard.BaseKeyboard
| __init__ (self)

## Public Attributes
| experiment = settings.osexperiment
| keyboard

## Constructor & Destructor Documentation

## ◆ __init__()

pygaze._keyboard.oskeyboard.OSKeyboard.__init__ | ( |  | self,
|  |  | keylist = settings.KEYLIST,
|  |  | timeout = settings.KEYTIMEOUT )

## Member Function Documentation

## ◆ get_key()

pygaze._keyboard.oskeyboard.OSKeyboard.get_key | ( |  | self,
|  |  | keylist = u'default',
|  |  | timeout = u'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.oskeyboard.OSKeyboard.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.oskeyboard.OSKeyboard.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

## ◆ experiment

pygaze._keyboard.oskeyboard.OSKeyboard.experiment = settings.osexperiment

## ◆ keyboard

pygaze._keyboard.oskeyboard.OSKeyboard.keyboard

Initial value:
= keyboard(self.experiment, keylist=keylist,
timeout=timeout)

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

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