21 references to Key
dotnet (2)
InteractiveConsole.cs (2)
41if (key.Key == ConsoleKey.Enter || KeyMatches(key, CliCommandStrings.ConfirmationPromptYesValue)) 46if ((acceptEscapeForFalse && key.Key == ConsoleKey.Escape) || KeyMatches(key, CliCommandStrings.ConfirmationPromptNoValue))
dotnet-svcutil-lib (7)
CmdCredentialsProvider.cs (7)
262while (keyInfo.Key != ConsoleKey.Enter && keyInfo.Key != ConsoleKey.Escape); 265if (keyInfo.Key == ConsoleKey.Escape && throwOnEscape) 270return keyInfo.Key == ConsoleKey.Enter; 283if (keyInfo.Key == ConsoleKey.Escape) 288else if (keyInfo.Key == ConsoleKey.Backspace && userInput.Length > 0) 299while (keyInfo.Key != ConsoleKey.Enter);
Microsoft.DotNet.HotReload.Watch (6)
HotReload\HotReloadDotNetWatcher.cs (1)
72if (key.Modifiers.HasFlag(ConsoleModifiers.Control) && key.Key == ConsoleKey.R && forceRestartCancellationSource is { } source)
UI\ConsoleInputReader.cs (1)
66var keyDisplay = (key.Modifiers == ConsoleModifiers.None) ? key.KeyChar.ToString() : key.Key.ToString();
UI\PhysicalConsole.cs (1)
101if (key.Key != ConsoleKey.None)
UI\RestartPrompt.cs (2)
25switch (keyInfo.Key) 46=> info is { Key: ConsoleKey.Y or ConsoleKey.N or ConsoleKey.A or ConsoleKey.V, Modifiers: ConsoleModifiers.None };
UI\ShutdownHandler.cs (1)
21if (!_disposed && key.Modifiers.HasFlag(ConsoleModifiers.Control) && key.Key == ConsoleKey.C)
System.Console (6)
System\IO\KeyParser.cs (1)
36return new ConsoleKeyInfo(parsed.KeyChar, parsed.Key, (parsed.Modifiers & ConsoleModifiers.Shift) != 0, alt: true, (parsed.Modifiers & ConsoleModifiers.Control) != 0);
System\IO\StdInReader.cs (5)
168if (!consumeKeys && keyInfo.Key != ConsoleKey.Backspace) // backspace is the only character not written out in the below if/elses. 179if (keyInfo.Key == ConsoleKey.Enter) 191else if (keyInfo.Key == ConsoleKey.Backspace) 234else if (keyInfo.Key == ConsoleKey.Tab) 245else if (keyInfo.Key == ConsoleKey.Clear)