Msvm_Keyboard class

Represents a keyboard device. Keyboards are logical devices that are always present in a virtual machine, and thus are not allocated through a resource pool. One instance is always present in a virtual computer system.

The following syntax is simplified Managed Object Format (MOF) code, and it includes all of the inherited properties.

Syntax

[Dynamic, Provider("VmmsWmiInstanceAndMethodProvider"), AMENDMENT]
class Msvm_Keyboard : CIM_UserDevice
{
  string   InstanceID;
  string   Caption = "Keyboard";
  string   Description = "Microsoft Virtual Keyboard";
  string   ElementName = "Keyboard";
  datetime InstallDate;
  string   Name = "Keyboard";
  uint16   OperationalStatus[] = { 2 };
  string   StatusDescriptions[] = { "OK" };
  string   Status;
  uint16   HealthState = 5;
  uint16   CommunicationStatus;
  uint16   DetailedStatus;
  uint16   OperatingStatus;
  uint16   PrimaryStatus;
  uint16   EnabledState = 5;
  string   OtherEnabledState;
  uint16   RequestedState = 12;
  uint16   EnabledDefault = 2;
  datetime TimeOfLastStateChange;
  uint16   AvailableRequestedStates[];
  uint16   TransitioningToState;
  string   SystemCreationClassName = "Msvm_ComputerSystem";
  string   SystemName;
  string   CreationClassName = "Msvm_Keyboard";
  string   DeviceID;
  boolean  PowerManagementSupported;
  uint16   PowerManagementCapabilities[];
  uint16   Availability = 6;
  uint16   StatusInfo;
  uint32   LastErrorCode;
  string   ErrorDescription;
  boolean  ErrorCleared;
  string   OtherIdentifyingInfo[];
  uint64   PowerOnHours;
  uint64   TotalPowerOnHours;
  string   IdentifyingDescriptions[];
  uint16   AdditionalAvailability[] = { 6 };
  uint64   MaxQuiesceTime;
  boolean  IsLocked = False;
  string   Layout = "00000409";
  uint16   NumberOfFunctionKeys = 12;
  uint16   Password = 5;
  boolean  UnicodeSupported;
};

Members

The Msvm_Keyboard class has these types of members:

Methods

The Msvm_Keyboard class has these methods.

Method Description
EnableDevice This method is not supported.
IsKeyPressed Retrieves the key state of a key.
OnlineDevice This method is not supported.
PressKey Simulates a key press.
QuiesceDevice This method is not supported.
ReleaseKey Simulates a key release.
RequestStateChange Requests that the state of the element be changed.
Reset Resets the virtual keyboard.
RestoreProperties This method is not supported.
SaveProperties This method is not supported.
SetPowerState This method is not supported.
TypeCtrlAltDel Simulates a Ctrl+Alt+Del key sequence.
TypeKey Simulates a press-release key sequence.
TypeScancodes Simulates a key sequence using scan codes.
TypeText Simulates a series of typed characters.

Properties

The Msvm_Keyboard class has these properties.

AdditionalAvailability

Data type: uint16 array

Access type: Read-only

Any additional availability and status of the device, beyond that specified in the Availability property. The Availability property denotes the primary status and availability of the device. This property is inherited from CIM_LogicalDevice.

Availability

Data type: uint16

Access type: Read-only

The primary availability and status of the device. This property is inherited from CIM_LogicalDevice.

AvailableRequestedStates

Data type: uint16 array

Access type: Read-only

Indicates the possible values for the RequestedState parameter of the RequestStateChange method. This property is inherited from CIM_EnabledLogicalElement, and it is always set to Null.

Caption

Data type: string

Access type: Read-only

Qualifiers: MaxLen (64)

A short description of the object. This property is inherited from CIM_ManagedElement.

CommunicationStatus

Data type: uint16

Access type: Read-only

Indicates the ability of the instrumentation to communicate with the underlying managed element. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.

Unknown (0)

Not Available (1)

Communication OK (2)

Lost Communication (3)

No Contact (4)

DMTF Reserved (..)

Vendor Reserved (0x8000.. )

CreationClassName

Data type: string

Access type: Read-only

Qualifiers: MaxLen (256)

The name of the class or subclass used in the creation of an instance. When used with other key properties of the class, this property allows all instances of the class and its subclasses to be uniquely identified. This property is inherited from CIM_LogicalDevice.

Description

Data type: string

Access type: Read-only

A description of the object. This property is inherited from CIM_ManagedElement.

DetailedStatus

Data type: uint16

Access type: Read-only

Compliments the PrimaryStatus property with additional status detail. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.

Not Available (0)

No Additional Information (1)

Stressed (2)

Predictive Failure (3)

Non-Recoverable Error (4)

Supporting Entity in Error (5)

DMTF Reserved (..)

Vendor Reserved (0x8000.. )

DeviceID

Data type: string

Access type: Read-only

An address or other identifying information to uniquely name the logical device. This property is inherited from CIM_LogicalDevice, and it is always set to "Microsoft:GUID".

ElementName

Data type: string

Access type: Read-only

A display name for the object. This property allows each instance to define a display name in addition to its key properties, identity data, and description information. The Name property of the CIM_ManagedSystemElement class is also defined as a display name. But, it is often subclassed to be a Key. It is not reasonable that the same property can convey both identity and a display name, without inconsistencies. Where Name exists and is not a Key (such as for instances of CIM_LogicalDevice), the same information can be present in both the Name and ElementName properties. This property is inherited from CIM_ManagedElement.

EnabledDefault

Data type: uint16

Access type: Read-only

An administrator's default or startup configuration for the enabled state of an element. This property is inherited from CIM_EnabledLogicalElement.

Value Meaning
2
Enabled

EnabledState

Data type: uint16

Access type: Read-only

Indicates the enabled and disabled states of an element. It can also indicate the transitions between these requested states. For example, shutting down (value=4) and starting (value=10) are transient states between enabled and disabled.

Value Meaning
Unknown
0
Unknown
Other
1
Other
Enabled
2
The element is or could be executing commands, will process any queued commands, and queues new requests.
Disabled
3
The element will not execute commands and will drop any new requests.
Shutting Down
4
The element is in the process of going to a Disabled state.
Not Applicable
5
The element does not support being enabled or disabled.
Enabled but Offline
6
The element might be completing commands and will drop any new requests.
In Test
7
The element is in a test state.
Deferred
8
The element might be completing commands, but it will queue any new requests.
Quiesce
9
The element is enabled but in a restricted mode. The behavior of the element is similar to the Enabled state (2), but it processes only a restricted set of commands. All other requests are queued.
Starting
10
The element is in the process of going to an Enabled state (2). New requests are queued.
DMTF Reserved
11 32767
This value is reserved.
Vendor Reserved
32768 65535
This value is reserved.

ErrorCleared

Data type: boolean

Access type: Read-only

Indicates whether the error reported in LastErrorCode is now cleared. This property is inherited from CIM_LogicalDevice, but it is not used.

ErrorDescription

Data type: string

Access type: Read-only

A string that provides more information about the error recorded in LastErrorCode and information about any corrective actions that can be taken. This property is inherited from CIM_LogicalDevice, but it is not used.

HealthState

Data type: uint16

Access type: Read-only

The current health of the element. This property is inherited from CIM_ManagedSystemElement, and it is always set to 5 (OK).

IdentifyingDescriptions

Data type: string array

Access type: Read-only

An array of free-form strings that provide explanations and details behind the entries in the OtherIdentifyingInfo array. This property is inherited from CIM_LogicalDevice.

InstallDate

Data type: datetime

Access type: Read-only

The date and time when the virtual machine was created. This property is inherited from CIM_ManagedSystemElement.

InstanceID

Data type: string

Access type: Read-only

Qualifiers: Key

Uniquely identifies an instance of this class. This property is inherited from CIM_ManagedElement.

IsLocked

Data type: boolean

Access type: Read-only

Indicates whether the device is locked, preventing user input or output. This property is inherited from CIM_UserDevice.

LastErrorCode

Data type: uint32

Access type: Read-only

The last error code reported by the logical device. This property is inherited from CIM_LogicalDevice, but it is not used.

Layout

Data type: string

Access type: Read-only

A string indicating the format and layout of the keyboard.

MaxQuiesceTime

Data type: uint64

Access type: Read-only

This property has been deprecated. This property is inherited from CIM_LogicalDevice, but it is not used.

Name

Data type: string

Access type: Read-only

Qualifiers: MaxLen (1024)

The label by which the object is known. When subclassed, this property can be overridden to be a key property. This property is inherited from CIM_ManagedSystemElement.

NumberOfFunctionKeys

Data type: uint16

Access type: Read-only

The number of function keys on the keyboard.

OperatingStatus

Data type: uint16

Access type: Read-only

Provides current status information for the operational condition of the element and can be used for providing more detail with respect to the value of the EnabledState property. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.

Unknown (0)

Not Available (1)

Servicing (2)

Starting (3)

Stopping (4)

Stopped (5)

Aborted (6)

Dormant (7)

Completed (8)

Migrating (9)

Emigrating (10)

Immigrating (11)

Snapshotting (12)

Shutting Down (13)

In Test (14)

Transitioning (15)

In Service (16)

DMTF Reserved (..)

Vendor Reserved (0x8000.. )

OperationalStatus

Data type: uint16 array

Access type: Read-only

The current status of the element. This property is inherited from CIM_ManagedSystemElement, and it is always set to 2 (OK).

OtherEnabledState

Data type: string

Access type: Read-only

A string that describes the enabled or disabled state of the element when the EnabledState property is set to 1 (Other). This property must be set to Null when EnabledState is any value other than 1. This property is inherited from CIM_EnabledLogicalElement.

OtherIdentifyingInfo

Data type: string array

Access type: Read-only

Any additional data, beyond device ID information, that could be used to identify a logical device. This property is inherited from CIM_LogicalDevice and it is always set to Null.

Password

Data type: uint16

Access type: Read-only

Indicates whether a hardware-level password is enabled at the keyboard, preventing local input.

5

Not implemented.

PowerManagementCapabilities

Data type: uint16 array

Access type: Read-only

The power management capabilities of the device. This property is inherited from CIM_LogicalDevice, but it is not used.

PowerManagementSupported

Data type: boolean

Access type: Read-only

Indicates whether the device can be power managed. This property is inherited from CIM_LogicalDevice, but it is not used.

PowerOnHours

Data type: uint64

Access type: Read-only

The number of consecutive hours that this device has been powered on since its last power cycle. This property is inherited from CIM_LogicalDevice, but it is not used.

PrimaryStatus

Data type: uint16

Access type: Read-only

Provides high level status information. This property should be used in conjunction with the DetailedStatus property to provide high level and detailed health status of the element and its subcomponents. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.

Unknown (0)

OK (1)

Degraded (2)

Error (3)

DMTF Reserved (..)

Vendor Reserved (0x8000.. )

RequestedState

Data type: uint16

Access type: Read-only

The last requested state for the element.

Value Meaning
Not Applicable
12
Not applicable.

Status

Data type: string

Access type: Read-only

This property is inherited from CIM_ManagedSystemElement, but it is not used.

StatusDescriptions

Data type: string array

Access type: Read-only

Strings that describe the various OperationalStatus array values. This property is inherited from CIM_ManagedSystemElement, and it is always set to "OK".

StatusInfo

Data type: uint16

Access type: Read-only

The current state of the logical device. This property is inherited from CIM_LogicalDevice, but it is not used.

SystemCreationClassName

Data type: string

Access type: Read-only

Qualifiers: MaxLen (256)

The scoping system's creation class name. This property is inherited from CIM_LogicalDevice, and it is set to "Msvm_ComputerSystem".

SystemName

Data type: string

Access type: Read-only

Qualifiers: MaxLen (256)

The scoping system's name. This value corresponds to the value of the Name property of the Msvm_ComputerSystem class for the scoping virtual machine. This property is inherited from CIM_LogicalDevice.

TimeOfLastStateChange

Data type: datetime

Access type: Read-only

The date and time when the enabled state of the element last changed. If the state of the element has not changed and this property is populated, then it must be set to a 0 interval value. If a state change was requested, but rejected or not yet processed, the property must not be updated. This property is inherited from CIM_EnabledLogicalElement, and it is always set to Null.

TotalPowerOnHours

Data type: uint64

Access type: Read-only

The total number of hours that this device has been powered. This property is inherited from CIM_LogicalDevice, but it is not used.

TransitioningToState

Data type: uint16

Access type: Read-only

Indicates the target state to which the instance is transitioning. This property is inherited from CIM_EnabledLogicalElement, and it is always set to Null.

UnicodeSupported

Data type: boolean

Access type: Read-only

Indicates if the virtual keyboard supports Unicode characters. This can be one of the following values.

Value Meaning
True
The virtual keyboard supports Unicode characters.
False
The virtual keyboard does not support Unicode characters.

Remarks

Access to the Msvm_Keyboard class might be restricted by UAC Filtering. For more information, see User Account Control and WMI.

Requirements

Minimum supported client
Windows 8 [desktop apps only]
Minimum supported server
Windows Server 2012 [desktop apps only]
Namespace
Root\Virtualization\V2
MOF
WindowsVirtualization.V2.mof
DLL
Vmms.exe

See also

CIM_UserDevice

CIM_UserDevice

Input Classes