Gets the numeric code of a key that is pressed.
HRESULT IDOMKeyboardEvent::get_which(long *p);
- Pointer to a variable of type long that receives the key code.
Returns S_OK if successful, or an error value otherwise.
The which property is provided for compatibility only. The IDOMKeyboardEvent::keyCode property is more widely supported; however, we recommend the key property for international keyboard layouts and improved accessibility.