How do i use a variable to press a key with robot class

i dont know how to explain it but
i have a function that should press a key that’s specified when it gets called
so the caller looks like this:

Presskey(robot, S)

and the PressKey function should press and release the second variable S in this example