SadConsole.Input.AsciiKey.Get C# (CSharp) Method

Get() public static method

Shortcut to get the AsciiKey for a specific MonoGame/XNA Keys type. Shift is considered not pressed.
public static Get ( Keys key ) : AsciiKey
key Keys The key.
return AsciiKey
        public static AsciiKey Get(Keys key)
        {
            AsciiKey asciiKey = new AsciiKey();
            asciiKey.Fill(key, false);
            return asciiKey;
        }

Same methods

AsciiKey::Get ( Keys key, bool shiftPressed ) : AsciiKey

Usage Example

Example #1
0
 /// <summary>
 /// Returns true when they is in the <see cref="KeysReleased"/> collection.
 /// </summary>
 /// <param name="key">The key to check.</param>
 /// <returns>True when the key was released this update frame.</returns>
 public bool IsKeyReleased(Keys key)
 {
     return(KeysReleased.Contains(AsciiKey.Get(key)));
 }
All Usage Examples Of SadConsole.Input.AsciiKey::Get