Get key pressed

Is there a simple way to get which key that a user has pressed?

Thanks