Skip to content
Advertisement

What does VK stand for in Java’s KeyEvent class?

I would like to know, what does VK stand for in java?

Here is an instance code in order to give you a brief idea where it is used:

public void keyPressed(KeyEvent e){ if (e.getKeyCode == KeyEvent.VK_UP) {...}}

Advertisement

Answer

It’s a shorthand for “Virtual Key”:

KeyEvent:

Virtual key codes are used to report which keyboard key has been pressed, rather than a character generated by the combination of one or more keystrokes (such as “A”, which comes from shift and “a”).

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement