Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Gets the location of a key on the keyboard or device.
![]() ![]() |
Syntax
HRESULT value = object.get_location(unsigned long* p);
Property values
Type: unsigned long
DOM_KEY_LOCATION_STANDARD (0x00)
The key is not on the right or left, and it did not originate from the numeric keypad (for example, the Q key).
DOM_KEY_LOCATION_LEFT (0x01)
A left key was activated (for example, the left Shift key).
DOM_KEY_LOCATION_RIGHT (0x02)
A right key was activated (for example, the right Shift key).
DOM_KEY_LOCATION_NUMPAD (0x03)
The key originated on the numeric keypad (for example, the 1 key on the numeric keypad).
DOM_KEY_LOCATION_MOBILE (0x04)
The key originated on the physical or virtual keyboard of a mobile device.
DOM_KEY_LOCATION_JOYSTICK (0x05)
The key originated on a game controller or joystick.
Standards information
- Document Object Model (DOM) Level 3 Events Specification, Section 5.2.6
Remarks
The IDOMKeyboardEvent::location property is not set during HTMLFrameSiteEvents::onkeypress events. It is available only during HTMLFrameSiteEvents::onkeydown and HTMLFrameSiteEvents::onkeyup events.
See also
Reference
.png)
.png)