location property

[This documentation is preliminary and is subject to change.]

Gets the location of a key on the keyboard or device.

Document Object Model (DOM) Level 3 Events Specification, Section 5.2.6Internet Explorer 9

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

Remarks

The location property is not set during onkeypress events. It is available only during onkeydown and onkeyup events.

See also

Reference

onkeydown

onkeyup

 

 

Build date: 1/23/2012