Enum stick::Event[][src]

#[non_exhaustive]
pub enum Event {
Show 95 variants Disconnect, Exit(bool), ActionA(bool), ActionB(bool), ActionC(bool), ActionH(bool), ActionV(bool), ActionD(bool), MenuL(bool), MenuR(bool), Joy(bool), Cam(bool), BumperL(bool), BumperR(bool), TriggerL(f64), TriggerR(f64), Up(bool), Down(bool), Left(bool), Right(bool), PovUp(bool), PovDown(bool), PovLeft(bool), PovRight(bool), HatUp(bool), HatDown(bool), HatLeft(bool), HatRight(bool), TrimUp(bool), TrimDown(bool), TrimLeft(bool), TrimRight(bool), MicUp(bool), MicDown(bool), MicLeft(bool), MicRight(bool), JoyX(f64), JoyY(f64), JoyZ(f64), CamX(f64), CamY(f64), CamZ(f64), Slew(f64), Throttle(f64), ThrottleL(f64), ThrottleR(f64), Volume(f64), Wheel(f64), Rudder(f64), Gas(f64), Brake(f64), MicPush(bool), Trigger(bool), Bumper(bool), ActionM(bool), ActionL(bool), ActionR(bool), Pinky(bool), PinkyForward(bool), PinkyBackward(bool), FlapsUp(bool), FlapsDown(bool), BoatForward(bool), BoatBackward(bool), AutopilotPath(bool), AutopilotAlt(bool), EngineMotorL(bool), EngineMotorR(bool), EngineFuelFlowL(bool), EngineFuelFlowR(bool), EngineIgnitionL(bool), EngineIgnitionR(bool), SpeedbrakeBackward(bool), SpeedbrakeForward(bool), ChinaBackward(bool), ChinaForward(bool), Apu(bool), RadarAltimeter(bool), LandingGearSilence(bool), Eac(bool), AutopilotToggle(bool), ThrottleButton(bool), MouseX(f64), MouseY(f64), Mouse(bool), Number(i8, bool), PaddleLeft(bool), PaddleRight(bool), PinkyLeft(bool), PinkyRight(bool), Context(bool), Dpi(bool), ScrollX(f64), ScrollY(f64), Scroll(bool),
}
Expand description

An event from a Controller.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Disconnect

Controller unplugged.

Exit

Exit / Main / Home / Mode

Tuple Fields of Exit

0: bool
ActionA

A / 1 / 4 / Circle. Action A (Primary action).

Tuple Fields of ActionA

0: bool
ActionB

B / 2 / 3 / Cross. Action B (Secondary action).

Tuple Fields of ActionB

0: bool
ActionC

C. Action C (Tertiary action).

Tuple Fields of ActionC

0: bool
ActionH

Y / X / Square. Action H (Horizontal action).

Tuple Fields of ActionH

0: bool
ActionV

X / Y / Triangle. Action V (Vertical action).

Tuple Fields of ActionV

0: bool
ActionD

Z (in 6-button layout). Action D.

Tuple Fields of ActionD

0: bool
MenuL

Left Menu / Back / Select / Minus / Stop

Tuple Fields of MenuL

0: bool
MenuR

Right Menu / Forward / Start / Plus / Play

Tuple Fields of MenuR

0: bool
Joy

Thumb Push Button On Main / Left Joystick

Tuple Fields of Joy

0: bool
Cam

Thumb Push Button On Camera / Right Joystick

Tuple Fields of Cam

0: bool
BumperL

Left shoulder button (near button if no trigger)

Tuple Fields of BumperL

0: bool
BumperR

Right shoulder button (near button if no trigger)

Tuple Fields of BumperR

0: bool
TriggerL

Left Bumper Trigger (far button if no trigger) - between 0.0 and 1.0

Tuple Fields of TriggerL

0: f64
TriggerR

Right Bumper Trigger (far button if no trigger) - between 0.0 and 1.0

Tuple Fields of TriggerR

0: f64
Up

D-Pad Up

Tuple Fields of Up

0: bool
Down

D-Pad Down

Tuple Fields of Down

0: bool
Left

D-Pad Left

Tuple Fields of Left

0: bool
Right

D-Pad Right

Tuple Fields of Right

0: bool
PovUp

POV/Main Hat Left

Tuple Fields of PovUp

0: bool
PovDown

POV/Main Hat Down

Tuple Fields of PovDown

0: bool
PovLeft

POV/Main Hat Left

Tuple Fields of PovLeft

0: bool
PovRight

POV/Main Hat Right

Tuple Fields of PovRight

0: bool
HatUp

Extra Hat Up

Tuple Fields of HatUp

0: bool
HatDown

Extra Hat Down

Tuple Fields of HatDown

0: bool
HatLeft

Extra Hat Left

Tuple Fields of HatLeft

0: bool
HatRight

Extra Hat Right

Tuple Fields of HatRight

0: bool
TrimUp

Trim Hat Up

Tuple Fields of TrimUp

0: bool
TrimDown

Trim Hat Down

Tuple Fields of TrimDown

0: bool
TrimLeft

Trim Hat Left

Tuple Fields of TrimLeft

0: bool
TrimRight

Trim Hat Right

Tuple Fields of TrimRight

0: bool
MicUp

Mic Hat Up

Tuple Fields of MicUp

0: bool
MicDown

Mic Hat Down

Tuple Fields of MicDown

0: bool
MicLeft

Mic Hat Left

Tuple Fields of MicLeft

0: bool
MicRight

Mic Hat Right

Tuple Fields of MicRight

0: bool
JoyX

Main stick horizontal axis (A / D) - between -1.0 and 1.0

Tuple Fields of JoyX

0: f64
JoyY

Main stick vertical / depth axis (W / S) - between -1.0 and 1.0

Tuple Fields of JoyY

0: f64
JoyZ

Main stick rotation / yaw axis - between -1.0 and 1.0

Tuple Fields of JoyZ

0: f64
CamX

Secondary stick X axis (Mouse X Position) - between -1.0 and 1.0

Tuple Fields of CamX

0: f64
CamY

Secondary stick Y axis (Mouse Y Position) - between -1.0 and 1.0

Tuple Fields of CamY

0: f64
CamZ

Secondary stick Z axis - between -1.0 and 1.0

Tuple Fields of CamZ

0: f64
Slew

Slew Control - between 0.0 and 1.0

Tuple Fields of Slew

0: f64
Throttle

Stationary throttle (0.0 is forward, 1.0 is backward)

Tuple Fields of Throttle

0: f64
ThrottleL

Left stationary throttle (0.0 is forward, 1.0 is backward)

Tuple Fields of ThrottleL

0: f64
ThrottleR

Right stationary throttle (0.0 is forward, 1.0 is backward)

Tuple Fields of ThrottleR

0: f64
Volume

Volume axis (0.0 is off, 1.0 is full volume)

Tuple Fields of Volume

0: f64
Wheel

Steering wheel - between 0.0 and 1.0

Tuple Fields of Wheel

0: f64
Rudder

Ship rudder - between 0.0 and 1.0

Tuple Fields of Rudder

0: f64
Gas

Gas Pedal - between 0.0 and 1.0

Tuple Fields of Gas

0: f64
Brake

Brake Pedal - between 0.0 and 1.0

Tuple Fields of Brake

0: f64
MicPush

Mic Hat Push Button

Tuple Fields of MicPush

0: bool
Trigger

Flightstick trigger button on the back.

Tuple Fields of Trigger

0: bool
Bumper

Flightstick Side Bumper Button

Tuple Fields of Bumper

0: bool
ActionM

Flightstick Top Middle Action Button

Tuple Fields of ActionM

0: bool
ActionL

Flightstick Top Left Action Button

Tuple Fields of ActionL

0: bool
ActionR

Flightstick Top Right Action Button

Tuple Fields of ActionR

0: bool
Pinky

Pinky Button

Tuple Fields of Pinky

0: bool
PinkyForward

Pinky three-way switch Forward.

Tuple Fields of PinkyForward

0: bool
PinkyBackward

Pinky three-way switch Backward.

Tuple Fields of PinkyBackward

0: bool
FlapsUp

Flaps three-way switch Forward.

  • true - Forward (Up)
  • false - Neutral (Maneuver)

Tuple Fields of FlapsUp

0: bool
FlapsDown

Flaps three-way switch Backward.

  • true - Backward (Down)
  • false - Neutral (Maneuver)

Tuple Fields of FlapsDown

0: bool
BoatForward

Boat three-way switch Forward.

Tuple Fields of BoatForward

0: bool
BoatBackward

Boat three-way switch Backward.

Tuple Fields of BoatBackward

0: bool
AutopilotPath

Autopilot three-way switch Forward.

  • true - Forward (Path)
  • false - Neutral (Altitude / Heading)

Tuple Fields of AutopilotPath

0: bool
AutopilotAlt

Autopilot three-way switch Backward.

  • true - Backward (Alt)
  • false - Neutral (Altitude / Heading)

Tuple Fields of AutopilotAlt

0: bool
EngineMotorL

Left Engine Operate three-way switch Backward.

  • true - Backward (Motor)
  • false - Neutral (Normal)

Tuple Fields of EngineMotorL

0: bool
EngineMotorR

Right Engine Operate three-way switch Backward.

  • true - Backward (Motor)
  • false - Neutral (Normal)

Tuple Fields of EngineMotorR

0: bool
EngineFuelFlowL

Engine Fuel Flow Left two-way switch

  • true - Normal
  • false - Override

Tuple Fields of EngineFuelFlowL

0: bool
EngineFuelFlowR

Engine Fuel Flow Right two-way switch

  • true - Normal
  • false - Override

Tuple Fields of EngineFuelFlowR

0: bool
EngineIgnitionL

Left Engine Operate three-way switch Forward.

  • true - Forward (Ignition)
  • false - Neutral (Normal)

Tuple Fields of EngineIgnitionL

0: bool
EngineIgnitionR

Right Engine Operate three-way switch Forward.

  • true - Forward (Ignition)
  • false - Neutral (Normal)

Tuple Fields of EngineIgnitionR

0: bool
SpeedbrakeBackward

Speedbrake three-way switch Backward.

Tuple Fields of SpeedbrakeBackward

0: bool
SpeedbrakeForward

Speedbrake three-way switch Forward.

Tuple Fields of SpeedbrakeForward

0: bool
ChinaBackward

China hat three-way switch Backward.

Tuple Fields of ChinaBackward

0: bool
ChinaForward

China hat three-way switch Forward.

Tuple Fields of ChinaForward

0: bool
Apu

APU (Auxiliary Power Unit) two-way switch

  • true - Start
  • false - Off

Tuple Fields of Apu

0: bool
RadarAltimeter

Radar Altimeter two-way switch (Altitude measurements)

  • true - Normal
  • false - Disabled

Tuple Fields of RadarAltimeter

0: bool
LandingGearSilence

Landing Gear Horn Silence Button

Tuple Fields of LandingGearSilence

0: bool
Eac

EAC (Enhanced Attitude Control - Autopilot) two-way switch

  • true - Arm
  • false - Off

Tuple Fields of Eac

0: bool
AutopilotToggle

Autopilot Toggle Button

Tuple Fields of AutopilotToggle

0: bool
ThrottleButton

Throttle button (Left)

Tuple Fields of ThrottleButton

0: bool
MouseX

Mouse delta position horizontal - between -1.0 and 1.0

Tuple Fields of MouseX

0: f64
MouseY

Mouse delta position vertical - between -1.0 and 1.0

Tuple Fields of MouseY

0: f64
Mouse

Mouse primary button

Tuple Fields of Mouse

0: bool
Number

Numbered or unlabeled programmable action buttons (If unlabelled, prefer numbering from left to right, upper to lower)

Tuple Fields of Number

0: i81: bool
PaddleLeft

Back left grip button (upper if there are two)

Tuple Fields of PaddleLeft

0: bool
PaddleRight

Back right grip button (upper if there are two)

Tuple Fields of PaddleRight

0: bool
PinkyLeft

Left Pinky Button / Back lower right grip button

Tuple Fields of PinkyLeft

0: bool
PinkyRight

Right Pinky Button / Back lower left grip button

Tuple Fields of PinkyRight

0: bool
Context

Context Menu Button on a mouse (Right Click)

Tuple Fields of Context

0: bool
Dpi

DPI Button on a mouse

Tuple Fields of Dpi

0: bool
ScrollX

Scroll Wheel X on a mouse - between -1.0 and 1.0

Tuple Fields of ScrollX

0: f64
ScrollY

Scroll Wheel Y on a mouse - between -1.0 and 1.0

Tuple Fields of ScrollY

0: f64
Scroll

Scroll Button on a mouse

Tuple Fields of Scroll

0: bool

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.