/// <summary> /// Converts AtfKeyEventArgs to WfKeyEventArgs</summary> /// <param name="args">AtfKeyEventArgs</param> /// <returns>WfKeyEventArgs</returns> public static WfKeyEventArgs ToWf(AtfKeyEventArgs args) { return new WfKeyEventArgs(KeysInterop.ToWf(args.KeyData)); }
/// <summary> /// Is the keyboard being used to move the camera? If the camera controller allows /// for this kind of control, then it can check in the OnKeyDown event handler if /// the user is intending to move the camera.</summary> /// <param name="controlScheme">The control scheme instance to extend</param> /// <param name="modifierKeys">The Control's ModifierKeys property</param> /// <param name="e">The key event from the KeyDown event handler, for example</param> /// <returns>True if the user is trying to move the camera using the keyboard</returns> public static bool IsControllingCamera(this ControlScheme controlScheme, WfKeys modifierKeys, AtfKeyEventArgs e) { return(controlScheme.IsControllingCamera(KeysInterop.ToAtf(modifierKeys), e)); }
/// <summary> /// Is the keyboard being used to move the camera? If the camera controller allows /// for this kind of control, then it can check in the OnKeyDown event handler if /// the user is intending to move the camera.</summary> /// <param name="controlScheme">The control scheme instance to extend</param> /// <param name="modifierKeys">The Control's ModifierKeys property</param> /// <param name="e">The key event from the KeyDown event handler, for example</param> /// <returns>True if the user is trying to move the camera using the keyboard</returns> public static bool IsControllingCamera(this ControlScheme controlScheme, WfKeys modifierKeys, AtfKeyEventArgs e) { return controlScheme.IsControllingCamera(KeysInterop.ToAtf(modifierKeys), e); }
/// <summary> /// Calls a Window class event handler to handle KeyUp event in ATF class</summary> /// <param name="e">Event arguments</param> protected virtual void OnKeyUp(AtfKeyEventArgs e) { base.OnKeyUp(KeyEventArgsInterop.ToWf(e)); }
/// <summary> /// Converts a AtfKeyEventArgs to AtfKeys value</summary> /// <param name="ke">AtfKeyEventArgs</param> /// <returns>AtfKeys enum</returns> public static AtfKeys KeyArgToKeys(AtfKeyEventArgs ke) { return(Input.KeysUtil.KeyArgToKeys(ke)); }
/// <summary> /// Converts AtfKeyEventArgs value to string</summary> /// <param name="ke">AtfKeyEventArgs</param> /// <returns>String representation of the KeyEventArgs value</returns> public static string KeyArgToString(AtfKeyEventArgs ke) { return(Input.KeysUtil.KeyArgToString(ke)); }
/// <summary> /// Converts AtfKeyEventArgs to WfKeyEventArgs</summary> /// <param name="args">AtfKeyEventArgs</param> /// <returns>WfKeyEventArgs</returns> public static WfKeyEventArgs ToWf(AtfKeyEventArgs args) { return(new WfKeyEventArgs(KeysInterop.ToWf(args.KeyData))); }