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