Show / Hide Table of Contents

Class KeyboardDeviceImp

Keyboard input device implementation for the WebAsm platform.

Inheritance
System.Object
KeyboardDeviceImp
Implements
IInputDeviceImp
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Engine.Imp.Graphics.Blazor
Assembly: Fusee.Engine.Imp.Graphics.Blazor.dll
Syntax
public class KeyboardDeviceImp : IInputDeviceImp

Properties

AxesCount

Returns the number of Axes (==0, keyboard does not support any axes).

Declaration
public int AxesCount { get; }
Property Value
Type Description
System.Int32

AxisImpDesc

Empty enumeration for keyboard, since AxesCount is 0.

Declaration
public IEnumerable<AxisImpDescription> AxisImpDesc { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<AxisImpDescription>

ButtonCount

Returns the number of enum values of KeyCodes

Declaration
public int ButtonCount { get; }
Property Value
Type Description
System.Int32

ButtonImpDesc

Returns a description for each keyboard button.

Declaration
public IEnumerable<ButtonImpDescription> ButtonImpDesc { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<ButtonImpDescription>

Category

This is a keyboard device, so this property returns Keyboard.

Declaration
public DeviceCategory Category { get; }
Property Value
Type Description
DeviceCategory

Desc

Human readable description of this device (to be used in dialogs).

Declaration
public string Desc { get; }
Property Value
Type Description
System.String

Id

Returns a (hopefully) unique ID for this driver. Uniqueness is granted by using the full class name (including name space).

Declaration
public string Id { get; }
Property Value
Type Description
System.String

Methods

GetAxis(Int32)

This device does not support any axes at all. Always throws.

Declaration
public float GetAxis(int iAxisId)
Parameters
Type Name Description
System.Int32 iAxisId

No matter what you specify here, you'll evoke an exception.

Returns
Type Description
System.Single

No return, always throws.

GetButton(Int32)

This device does not support to-be-polled-buttons. All keyboard buttons are event-driven. Listen to the ButtonValueChanged event to receive keyboard notifications from this device.

Declaration
public bool GetButton(int iButtonId)
Parameters
Type Name Description
System.Int32 iButtonId

No matter what you specify here, you'll evoke an exception.

Returns
Type Description
System.Boolean

No return, always throws.

Events

AxisValueChanged

No axes exist on this device, so listeners registered to this event will never get called.

Declaration
public event EventHandler<AxisValueChangedArgs> AxisValueChanged
Event Type
Type Description
System.EventHandler<AxisValueChangedArgs>

ButtonValueChanged

All buttons exhibited by this device are event-driven buttons, so this is the point to hook to in order to get information from this device.

Declaration
public event EventHandler<ButtonValueChangedArgs> ButtonValueChanged
Event Type
Type Description
System.EventHandler<ButtonValueChangedArgs>

Implements

IInputDeviceImp
Generated by DocFX
GitHub Repo
Back to top