What is the difference between Virtual Key Code
and Scan Code
. I read about scan code here but I do not understand what are virtual codes used for and what makes scan code different from virtual code ?
For example in Java :
private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) {
int code = evt.getKeyCode(); // WHAT DO I GET ? A Scan code or a Virtual Code..?
}
In C :
KBDLLHOOKSTRUCT *kbhook = (KBDLLHOOKSTRUCT *) lParam;
printf("%u\n",kbhook->vkCode); // WHAT DO I GET ? A Scan code or a Virtual Code..?
The above are just examples and I don't want the concept be clarified on this basis.
kbhook->vkCode
! ( vkCode , I guess stands for virtual code ) – Pokorny