reckfellENGINE

InputEventWithModifiers

Common event base with modifier flags.

On this page
class InputEventWithModifiersReckfellSharpInherits InputEventFromWindow

Flags describe a particular event, not keyboard state at the time it is read later. They can be assigned programmatically in InputEventKey, mouse events and other appropriate subclasses. Do not determine a standalone Ctrl or Shift key press solely from another event's modifier flags.

CommandOrControlAutoremap supports platform shortcuts but changes CtrlPressed/MetaPressed when toggled. IsCommandOrControlPressed reads the selected event flag; that is a different question from whether autoremap is enabled.

GetModifiersMask returns KeyModifierMask bits. InputEventKey provides separate GetKeycodeWithModifiers, GetPhysicalKeycodeWithModifiers and GetKeyLabelWithModifiers methods to combine a key code with that mask.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Properties5

AltPressedProperty
# AltPressed
C#
public bool AltPressed { get; set; }

Alt flag in this event's data, not a continuous keyboard-state query. Can be assigned programmatically.

CommandOrControlAutoremapProperty
# CommandOrControlAutoremap
C#
public bool CommandOrControlAutoremap { get; set; }

Selects the platform shortcut modifier: Ctrl in the current Windows build, Meta on platforms that prefer it. Enabling sets one flag and clears the other; disabling clears both. Direct CtrlPressed/MetaPressed assignment is prohibited while enabled. Does not mean a physical key is currently held.

CtrlPressedProperty
# CtrlPressed
C#
public bool CtrlPressed { get; set; }

Ctrl flag in this event's data, not a continuous keyboard-state query. Can be assigned programmatically. Direct CtrlPressed/MetaPressed changes are rejected by a native check while CommandOrControlAutoremap = true; do not rely on a CLR exception.

MetaPressedProperty
# MetaPressed
C#
public bool MetaPressed { get; set; }

Meta flag in this event's data, not a continuous keyboard-state query. Can be assigned programmatically. Direct CtrlPressed/MetaPressed changes are rejected by a native check while CommandOrControlAutoremap = true; do not rely on a CLR exception.

ShiftPressedProperty
# ShiftPressed
C#
public bool ShiftPressed { get; set; }

Shift flag in this event's data, not a continuous keyboard-state query. Can be assigned programmatically.

Methods12

GetModifiersMaskKeyModifierMask
# GetModifiersMask
C#
public KeyModifierMask GetModifiersMask();

Combines active Shift, Alt, Ctrl and Meta flags into KeyModifierMask. This is a modifier mask, not the main key code. Autoremap uses the platform-selected Ctrl/Meta modifier.

Returns KeyModifierMask

KeyModifierMask bit combination; 0 when no modifiers are present.

IsAltPressedbool
# IsAltPressed
C#
public bool IsAltPressed();

Returns AltPressed without modifying the event or polling the device.

Returns bool

Current boolean AltPressed value.

IsCommandOrControlAutoremapbool
# IsCommandOrControlAutoremap
C#
public bool IsCommandOrControlAutoremap();

Returns CommandOrControlAutoremap without modifying the event or polling the device.

Returns bool

Current boolean CommandOrControlAutoremap value.

IsCommandOrControlPressedbool
# IsCommandOrControlPressed
C#
public bool IsCommandOrControlPressed();

Reads CtrlPressed or MetaPressed according to the platform preference. Does not test whether CommandOrControlAutoremap is enabled or poll the live keyboard.

Returns bool

This event's platform-selected Ctrl/Meta flag.

IsCtrlPressedbool
# IsCtrlPressed
C#
public bool IsCtrlPressed();

Returns CtrlPressed without modifying the event or polling the device.

Returns bool

Current boolean CtrlPressed value.

IsMetaPressedbool
# IsMetaPressed
C#
public bool IsMetaPressed();

Returns MetaPressed without modifying the event or polling the device.

Returns bool

Current boolean MetaPressed value.

IsShiftPressedbool
# IsShiftPressed
C#
public bool IsShiftPressed();

Returns ShiftPressed without modifying the event or polling the device.

Returns bool

Current boolean ShiftPressed value.

SetAltPressedvoid
# SetAltPressed
C#
public void SetAltPressed(bool pressed);

Sets AltPressed with the same rules and flag side effects as the property.

Parameters
NameTypeDefault
pressedbool—
pressed

New boolean AltPressed value.

SetCommandOrControlAutoremapvoid
# SetCommandOrControlAutoremap
C#
public void SetCommandOrControlAutoremap(bool enable);

Sets CommandOrControlAutoremap with the same rules and flag side effects as the property.

Parameters
NameTypeDefault
enablebool—
enable

New boolean CommandOrControlAutoremap value.

SetCtrlPressedvoid
# SetCtrlPressed
C#
public void SetCtrlPressed(bool pressed);

Sets CtrlPressed with the same rules and flag side effects as the property.

Parameters
NameTypeDefault
pressedbool—
pressed

New boolean CtrlPressed value.

SetMetaPressedvoid
# SetMetaPressed
C#
public void SetMetaPressed(bool pressed);

Sets MetaPressed with the same rules and flag side effects as the property.

Parameters
NameTypeDefault
pressedbool—
pressed

New boolean MetaPressed value.

SetShiftPressedvoid
# SetShiftPressed
C#
public void SetShiftPressed(bool pressed);

Sets ShiftPressed with the same rules and flag side effects as the property.

Parameters
NameTypeDefault
pressedbool—
pressed

New boolean ShiftPressed value.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.