InjectedInputMouseInfo InjectedInputMouseInfo InjectedInputMouseInfo InjectedInputMouseInfo Class

Definition

Represents programmatically generated mouse input.

Note

The APIs in this namespace require the inputInjectionBrokered restricted capability.

public : sealed class InjectedInputMouseInfo : IInjectedInputMouseInfopublic sealed class InjectedInputMouseInfo : IInjectedInputMouseInfoPublic NotInheritable Class InjectedInputMouseInfo Implements IInjectedInputMouseInfo// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

Using input injection requires the following be added to the Package.appxmanifest:

  • To <Package>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • To <Capabilities>
    • <rescap:Capability Name="inputInjectionBrokered" />

Constructors

InjectedInputMouseInfo() InjectedInputMouseInfo() InjectedInputMouseInfo() InjectedInputMouseInfo()

Creates a new InjectedInputMouseInfo object that is used to specify the mouse input to inject.

Note

The APIs in this namespace require the inputInjectionBrokered restricted capability.

public : InjectedInputMouseInfo()public InjectedInputMouseInfo()Public Sub New()// You can use this method in JavaScript.

Remarks

Using input injection requires the following be added to the Package.appxmanifest:

  • To <Package>

    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"

    • IgnorableNamespaces="rescap"

  • To <Capabilities>

    • <rescap:Capability Name="inputInjectionBrokered" />

Properties

DeltaX DeltaX DeltaX DeltaX

Gets or sets the change in value of an x-coordinate since the last mouse wheel event.

Note

The APIs in this namespace require the inputInjectionBrokered restricted capability.

public : int DeltaX { get; set; }public int DeltaX { get; set; }Public ReadWrite Property DeltaX As int// You can use this property in JavaScript.
Value
int int int int

The number of notches or distance thresholds crossed since the last pointer event. The default value is 0.

Remarks

Using input injection requires the following be added to the Package.appxmanifest:

  • To <Package>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • To <Capabilities>
    • <rescap:Capability Name="inputInjectionBrokered" />

The x-coordinate value being changed is dependent on the flags set with MouseOptions. Some examples include:

  • HWheel: the distance that a mouse wheel has rotated around the x-axis (horizontal). The mouse wheel button has discrete, evenly spaced notches or distance thresholds (also called detents). When you rotate or tilt the wheel, a wheel message is sent as each detent is encountered.

The windows constant, WHEEL_DELTA (defined as a value of 120), describes one detent. Each detent marks the threshold for a single increment of an associated action (for example, scrolling a line or page).

Note

The delta was set to 120 to enable finer-resolution wheels (such as freely-rotating wheels with no notches) that send more messages per rotation, but with smaller values per message.

A positive value indicates that the wheel was rotated forward (away from the user) or tilted to the right; a negative value indicates that the wheel was rotated backward (toward the user) or tilted to the left.

  • XDown or XUp: 1 for XBUTTON1 or 2 for XBUTTON2XBUTTON1 and XBUTTON2 are additional buttons used on many mouse devices, often for forward and backward navigation in Web browsers. They return the same data as standard mouse buttons.

DeltaY DeltaY DeltaY DeltaY

Gets or sets the change in value of an x-coordinate since the last mouse wheel event.

Note

The APIs in this namespace require the inputInjectionBrokered restricted capability.

public : int DeltaY { get; set; }public int DeltaY { get; set; }Public ReadWrite Property DeltaY As int// You can use this property in JavaScript.
Value
int int int int

The number of notches or distance thresholds crossed since the last pointer event. The default value is 0.

Remarks

Using input injection requires the following be added to the Package.appxmanifest:

  • To <Package>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • To <Capabilities>
    • <rescap:Capability Name="inputInjectionBrokered" />

The x-coordinate value being changed is dependent on the flags set in MouseData. Some examples include:

  • Wheel: the distance that a mouse wheel has rotated around the y-axis (vertical). The mouse wheel button has discrete, evenly spaced notches or distance thresholds (also called detents). When you rotate or tilt the wheel, a wheel message is sent as each detent is encountered.

The windows constant, WHEEL_DELTA (defined as a value of 120), describes one detent. Each detent marks the threshold for a single increment of an associated action (for example, scrolling a line or page).

Note

The delta was set to 120 to enable finer-resolution wheels (such as freely-rotating wheels with no notches) that send more messages per rotation, but with smaller values per message.

A positive value indicates that the wheel was rotated forward (away from the user) or tilted to the right; a negative value indicates that the wheel was rotated backward (toward the user) or tilted to the left.

  • XDown or XUp: 1 for XBUTTON1 or 2 for XBUTTON2XBUTTON1 and XBUTTON2 are additional buttons used on many mouse devices, often for forward and backward navigation in Web browsers. They return the same data as standard mouse buttons.

MouseData MouseData MouseData MouseData

Gets or sets a value used by other properties. The value is based on the MouseOptions flags set.

Note

The APIs in this namespace require the inputInjectionBrokered restricted capability.

public : unsigned int MouseData { get; set; }public uint MouseData { get; set; }Public ReadWrite Property MouseData As uint// You can use this property in JavaScript.
Value
unsigned int uint uint uint

The value used by other properties.

Remarks

Using input injection requires the following be added to the Package.appxmanifest:

  • To <Package>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • To <Capabilities>
    • <rescap:Capability Name="inputInjectionBrokered" />

The x-coordinate value being changed is dependent on the flags set with MouseOptions. Some examples include:

  • HWheel: the distance that a mouse wheel has rotated around the x-axis (horizontal). The mouse wheel button has discrete, evenly spaced notches or distance thresholds (also called detents). When you rotate or tilt the wheel, a wheel message is sent as each detent is encountered.

The windows constant, WHEEL_DELTA (defined as a value of 120), describes one detent. Each detent marks the threshold for a single increment of an associated action (for example, scrolling a line or page).

Note

The delta was set to 120 to enable finer-resolution wheels (such as freely-rotating wheels with no notches) that send more messages per rotation, but with smaller values per message.

A positive value indicates that the wheel was rotated forward (away from the user) or tilted to the right; a negative value indicates that the wheel was rotated backward (toward the user) or tilted to the left.

  • XDown or XUp: 1 for XBUTTON1 or 2 for XBUTTON2XBUTTON1 and XBUTTON2 are additional buttons used on many mouse devices, often for forward and backward navigation in Web browsers. They return the same data as standard mouse buttons.

MouseOptions MouseOptions MouseOptions MouseOptions

Gets or sets the various options, or modifiers, used to simulate mouse input.

Note

The APIs in this namespace require the inputInjectionBrokered restricted capability.

public : InjectedInputMouseOptions MouseOptions { get; set; }public InjectedInputMouseOptions MouseOptions { get; set; }Public ReadWrite Property MouseOptions As InjectedInputMouseOptions// You can use this property in JavaScript.

Remarks

Using input injection requires the following be added to the Package.appxmanifest:

  • To <Package>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • To <Capabilities>
    • <rescap:Capability Name="inputInjectionBrokered" />

TimeOffsetInMilliseconds TimeOffsetInMilliseconds TimeOffsetInMilliseconds TimeOffsetInMilliseconds

Gets or sets the baseline, or reference value, for timed input events such as a double click/tap.

Note

The APIs in this namespace require the inputInjectionBrokered restricted capability.

public : unsigned int TimeOffsetInMilliseconds { get; set; }public uint TimeOffsetInMilliseconds { get; set; }Public ReadWrite Property TimeOffsetInMilliseconds As uint// You can use this property in JavaScript.
Value
unsigned int uint uint uint

The reference value for timed input events in milliseconds. If TimeOffsetInMilliseconds is set to 0, the current tick count is used.

Remarks

Using input injection requires the following be added to the Package.appxmanifest:

  • To <Package>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • To <Capabilities>
    • <rescap:Capability Name="inputInjectionBrokered" />