Keyboard press timing

Hi,
so i have a keyboad component (mykeyboard) I am trying to get the time (absolute time) of the first keypress out while the routine is still running, because it changes times for other stimuli in the routine. However I have been stumped.

I tried this (and similar things) in the each frame tab:

kb = mykeyboard
keys=kb.getKeys()
keys=keys.tDown

Here it always claims I do not have such an attribute. How do i have to formulate it so i get the first time (for example through tDown)

AttributeError: ‘list’ object has no attribute .tDown
AttributeError: ‘list’ object has no attribute .rt

Also tried the following:
kb = mykeyboard
keys=kb.getKeys()
keys=keys[0].tDown

where it says list index out of range, even though a key has been pressed, i.e. a press should be present.

How do i have to reformulate it to get that attribute out?