That 'key' variable is an integer. A KeyEvent is just an easy-to-remeber way to use it, but both are integers.
It means the method uses an integer, not a KeyEvent.
Let's say we have the following method:
public static void press(int event) throws AWTException {
Robot bot = new Robot();
bot.keyPress(event);
bot.keyRelease(event);
}
It could be called by two ways: the KeyEvent and an integer. All the same (don't forget to add a 'throws' statement or a 'try/catch'):
press(KeyEvent.VK_SLASH);
Or:
press(46);
If I'm right, both would send a slash (correct me if I'm wrong). But KeyEvents are way easier.
Also, keep in mind that not all keyboards have the same layout. Depending on the key, a completely different key would be sent, or worse, the robot would throw an IllegalArgumentException. I recommend you use Alt codes for characters that are not letters/numbers.