8 instantiations of ConsoleKeyInfo
System.Console (8)
System\IO\KeyParser.cs (5)
27return new ConsoleKeyInfo(buffer[startIndex++], ConsoleKey.Backspace, false, false, false); 36return new ConsoleKeyInfo(parsed.KeyChar, parsed.Key, (parsed.Modifiers & ConsoleModifiers.Shift) != 0, alt: true, (parsed.Modifiers & ConsoleModifiers.Control) != 0); 109parsed = new ConsoleKeyInfo(default, ConsoleKey.F1 + input[3] - 'A', false, false, false); 310=> new(keyChar, key, (modifiers & ConsoleModifiers.Shift) != 0, (modifiers & ConsoleModifiers.Alt) != 0, (modifiers & ConsoleModifiers.Control) != 0); 353return new ConsoleKeyInfo(keyChar, key, isShift, isAlt, isCtrl);
System\IO\StdInReader.cs (1)
359return new ConsoleKeyInfo((char)
System\TerminalFormatStrings.cs (2)
233KeyFormatToConsoleKey[keyFormat] = new ConsoleKeyInfo(key == ConsoleKey.Enter ? '\r' : '\0', key, shift, alt, control); 252KeyFormatToConsoleKey[keyFormat] = new ConsoleKeyInfo('\0', key, shift, alt, control);
35 references to ConsoleKeyInfo
dotnet-svcutil-lib (2)
CmdCredentialsProvider.cs (2)
255ConsoleKeyInfo keyInfo; 275ConsoleKeyInfo keyInfo;
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
132[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ConsoleKeyInfo))]
netstandard (1)
netstandard.cs (1)
436[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ConsoleKeyInfo))]
QueueSharing (1)
Program.cs (1)
21var key = Console.ReadKey();
System.Console (30)
System\Console.cs (2)
173public static ConsoleKeyInfo ReadKey() 182public static ConsoleKeyInfo ReadKey(bool intercept)
System\ConsoleKeyInfo.cs (7)
8public readonly struct ConsoleKeyInfo : IEquatable<ConsoleKeyInfo> 53return value is ConsoleKeyInfo info && Equals(info); 56public bool Equals(ConsoleKeyInfo obj) 61public static bool operator ==(ConsoleKeyInfo a, ConsoleKeyInfo b) 66public static bool operator !=(ConsoleKeyInfo a, ConsoleKeyInfo b)
System\ConsolePal.Unix.cs (2)
122public static ConsoleKeyInfo ReadKey(bool intercept) 131ConsoleKeyInfo keyInfo = StdInReader.ReadKey(intercept);
System\IO\KeyParser.cs (7)
18internal static ConsoleKeyInfo Parse(char[] buffer, TerminalFormatStrings terminalFormatStrings, byte posixDisableValue, byte veraseCharacter, ref int startIndex, int endIndex) 34if (TryParseTerminalInputSequence(buffer, terminalFormatStrings, out ConsoleKeyInfo parsed, ref startIndex, endIndex)) 40else if (length >= MinimalSequenceLength && TryParseTerminalInputSequence(buffer, terminalFormatStrings, out ConsoleKeyInfo parsed, ref startIndex, endIndex)) 54private static bool TryParseTerminalInputSequence(char[] buffer, TerminalFormatStrings terminalFormatStrings, out ConsoleKeyInfo parsed, ref int startIndex, int endIndex) 65Dictionary<string, ConsoleKeyInfo>.AlternateLookup<ReadOnlySpan<char>> terminfoDb = // the most important source of truth 309static ConsoleKeyInfo Create(char keyChar, ConsoleKey key, ConsoleModifiers modifiers) 313private static ConsoleKeyInfo ParseFromSingleChar(char single, bool isAlt)
System\IO\StdInReader.cs (9)
23private readonly Stack<ConsoleKeyInfo> _tmpKeys = new Stack<ConsoleKeyInfo>(); // temporary working stack; should be empty outside of ReadLine 24private readonly Stack<ConsoleKeyInfo> _availableKeys = new Stack<ConsoleKeyInfo>(); // a queue of already processed key infos available for reading 167ConsoleKeyInfo keyInfo = freshKeys ? ReadKey() : _availableKeys.Pop(); 293ConsoleKeyInfo keyInfo = peek ? _availableKeys.Peek() : _availableKeys.Pop(); 321public ConsoleKeyInfo ReadKey(bool intercept) 328ConsoleKeyInfo keyInfo = ReadKey(); 338private unsafe ConsoleKeyInfo ReadKey()
System\IO\SyncTextReader.Unix.cs (1)
23public ConsoleKeyInfo ReadKey(bool intercept)
System\TerminalFormatStrings.cs (2)
54public readonly Dictionary<string, ConsoleKeyInfo> KeyFormatToConsoleKey = new(StringComparer.Ordinal); 166foreach (KeyValuePair<string, ConsoleKeyInfo> entry in KeyFormatToConsoleKey)