134 references to None
System.Windows.Forms (30)
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
1858
if (keyCode == Keys.Insert && e.Modifiers == Keys.
None
&& _insertMode == InsertKeyMode.Default)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
2719
&& ToolStripManager.SelectNextToolStrip(this, forward: (keyData & Keys.Shift) == Keys.
None
))
2756
bool hasModifiers = ((keyData & (Keys.Alt | Keys.Control)) != Keys.
None
);
2775
retVal = ProcessTabKey((keyData & Keys.Shift) == Keys.
None
);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (1)
106
return (Control.MouseButtons == MouseButtons.Left) && (Control.ModifierKeys == Keys.
None
);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (4)
674
if (shortcut == Keys.
None
)
687
else if ((keyCode != Keys.
None
) && (modifiers != Keys.
None
))
936
if (PInvoke.GetKeyState((int)Keys.ShiftKey) < 0 && (keyData == Keys.
None
))
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (8)
355
[DefaultValue(Keys.
None
)]
359
get => Properties.GetValueOrDefault(s_propShortcutKeys, Keys.
None
);
362
if ((value != Keys.
None
) && !ToolStripManager.IsValidShortcut(value))
379
if (originalShortcut != Keys.
None
)
395
Properties.AddOrRemoveValue(s_propShortcutKeys, value, defaultValue: Keys.
None
);
570
if (shortcut != Keys.
None
&& _lastOwner.Shortcuts.ContainsKey(shortcut))
921
if (shortcut != Keys.
None
)
1099
if (shortcutKeys == Keys.
None
)
System\Windows\Forms\Form.cs (1)
4693
if ((keyData & (Keys.Alt | Keys.Control)) == Keys.
None
)
System\Windows\Forms\Input\KeyEventArgs.cs (1)
50
return Keys.
None
;
System\Windows\Forms\Input\KeysConverter.cs (5)
63
AddLocalizedKey(nameof(SR.toStringNone), Keys.
None
);
242
if (key != Keys.
None
)
249
if (keyValue != Keys.
None
&& modifiers.HasFlag(keyValue))
290
if (key != Keys.
None
)
297
if (keyValue != Keys.
None
&& modifiers.HasFlag(keyValue))
System\Windows\Forms\Input\PreviewKeyDownEventArgs.cs (1)
40
return Keys.
None
;
System\Windows\Forms\Layout\Containers\ContainerControl.cs (2)
1194
if ((keyData & (Keys.Alt | Keys.Control)) == Keys.
None
)
1200
if (ProcessTabKey((keyData & Keys.Shift) == Keys.
None
))
System\Windows\Forms\Layout\Containers\SplitContainer.cs (2)
2299
if ((keyData & (Keys.Alt | Keys.Control)) == Keys.
None
)
2305
if (ProcessTabKey((keyData & Keys.Shift) == Keys.
None
))
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
1008
if ((keyData & (Keys.Alt | Keys.Control)) == Keys.
None
)
System.Windows.Forms.Design (32)
System\Windows\Forms\Design\SelectionUIService.cs (1)
538
_ctrlSelect = (ModifierKeys & Keys.Control) != Keys.
None
;
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (8)
73
return Keys.
None
;
100
if (_unknownKeyCode != Keys.
None
)
103
_unknownKeyCode = Keys.
None
;
326
Keys keys = value is Keys keys1 ? keys1 : Keys.
None
;
332
if (keyCode == Keys.
None
)
361
Keys valueKeys = Keys.
None
;
377
if (_unknownKeyCode != Keys.
None
&& cmbKeySelectedIndex == 0)
383
valueKeys |= s_validKeys[_unknownKeyCode == Keys.
None
? cmbKeySelectedIndex : cmbKeySelectedIndex - 1];
System\Windows\Forms\Design\StandardMenuStripVerb.cs (21)
90
[/*File*/Keys.
None
, /*New*/Keys.Control | Keys.N, /*Open*/Keys.Control | Keys.O, /*Separator*/ Keys.
None
, /*Save*/ Keys.Control | Keys.S, /*SaveAs*/Keys.
None
, Keys.
None
, /*Print*/ Keys.Control | Keys.P, /*PrintPreview*/ Keys.
None
, /*Separator*/Keys.
None
, /*Exit*/ Keys.
None
],
91
[/*Edit*/Keys.
None
, /*Undo*/Keys.Control | Keys.Z, /*Redo*/Keys.Control | Keys.Y, /*Separator*/Keys.
None
, /*Cut*/ Keys.Control | Keys.X, /*Copy*/ Keys.Control | Keys.C, /*Paste*/Keys.Control | Keys.V, /*Separator*/ Keys.
None
, /*SelectAll*/Keys.
None
],
92
[/*Tools*/Keys.
None
, /*Customize*/Keys.
None
, /*Options*/Keys.
None
],
93
[/*Help*/Keys.
None
, /*Contents*/Keys.
None
, /*Index*/Keys.
None
, /*Search*/Keys.
None
, /*Separator*/Keys.
None
, /*About*/Keys.
None
]
158
if ((item is ToolStripMenuItem menuItem) && shortcut != Keys.
None
)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
1715
if ((keyData & (Keys.Alt | Keys.Control)) == Keys.
None
)
1721
retVal = ProcessTabKey((keyData & Keys.Shift) == Keys.
None
);
System.Windows.Forms.Tests (70)
System\Windows\Forms\ButtonBaseTests.cs (1)
5749
yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.
None
) };
System\Windows\Forms\ControlTests.Methods.cs (31)
4383
yield return new object[] { Keys.
None
, false };
4413
yield return new object[] { Keys.Control | Keys.
None
, false };
4443
yield return new object[] { Keys.Alt | Keys.
None
, false };
5259
yield return new object[] { 0, Keys.
None
, false };
5265
yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.
None
, false };
5271
yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.
None
, false };
5277
yield return new object[] { (int)PInvokeCore.WM_KEYUP, Keys.
None
, false };
5283
yield return new object[] { (int)PInvokeCore.WM_SYSKEYUP, Keys.
None
, false };
5289
yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.
None
, true };
5295
yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.
None
, false };
5301
yield return new object[] { (int)PInvokeCore.WM_KEYUP, Keys.
None
, false };
5307
yield return new object[] { (int)PInvokeCore.WM_SYSKEYUP, Keys.
None
, false };
5348
yield return new object[] { 0, Keys.
None
, false, false, false, false, false, false, 0, 0, 0, 0, 0 };
5351
yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.
None
, true, false, false, false, false, true, 1, 0, 0, 0, 0 };
5352
yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.
None
, false, true, false, false, false, false, 1, 1, 0, 0, 0 };
5353
yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.
None
, false, false, true, false, false, true, 1, 1, 1, 0, 0 };
5354
yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.
None
, false, false, false, false, false, false, 1, 1, 1, 0, 0 };
5360
yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.
None
, true, false, false, false, false, true, 1, 0, 0, 0, 0 };
5361
yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.
None
, false, true, false, false, false, false, 1, 1, 0, 0, 0 };
5362
yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.
None
, false, false, true, false, false, true, 1, 1, 1, 0, 0 };
5363
yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.
None
, false, false, false, false, false, false, 1, 1, 1, 0, 0 };
5369
yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.
None
, false, false, false, true, false, false, 0, 0, 0, 1, 0 };
5370
yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.
None
, false, false, false, true, true, false, 0, 0, 0, 1, 0 };
5371
yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.
None
, false, false, false, false, true, true, 0, 0, 0, 1, 1 };
5372
yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.
None
, false, false, false, false, false, false, 0, 0, 0, 1, 1 };
5378
yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.
None
, false, false, false, true, false, false, 0, 0, 0, 0, 1 };
5379
yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.
None
, false, false, false, true, true, true, 0, 0, 0, 0, 1 };
5380
yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.
None
, false, false, false, false, true, true, 0, 0, 0, 0, 1 };
5381
yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.
None
, false, false, false, false, false, false, 0, 0, 0, 0, 1 };
5387
yield return new object[] { (int)PInvokeCore.WM_KEYUP, Keys.
None
, false, false, false, false, false, false, 0, 0, 0, 0, 0 };
5390
yield return new object[] { (int)PInvokeCore.WM_SYSKEYUP, Keys.
None
, false, false, false, false, false, false, 0, 0, 0, 0, 0 };
System\Windows\Forms\KeyEventArgsTests.cs (1)
42
Assert.Equal(Keys.
None
, e.KeyCode);
System\Windows\Forms\KeysConverterTests.cs (5)
20
[InlineData("None", Keys.
None
)]
29
[InlineData(Keys.
None
, "(none)")]
46
yield return new object[] { "fr-FR", Keys.
None
, new Enum[] { Keys.
None
} };
105
Keys.
None
, Keys.D0, Keys.D1, Keys.D2, Keys.D3, Keys.D4, Keys.D5, Keys.D6, Keys.D7, Keys.D8, Keys.D9, Keys.Alt, Keys.Back, Keys.Control,
System\Windows\Forms\KeysConverterTests.LocalizationTests.cs (4)
17
[InlineData("fr-FR", "toStringNone", Keys.
None
)]
18
[InlineData("zh-CN", "toStringNone", Keys.
None
)]
19
[InlineData("nb-NO", "toStringNone", Keys.
None
)]
55
[InlineData("fr-FR", Keys.
None
, "toStringNone")]
System\Windows\Forms\PreviewKeyDownEventArgsTests.cs (1)
41
Assert.Equal(Keys.
None
, e.KeyCode);
System\Windows\Forms\SplitterTests.cs (1)
1822
yield return new object[] { new KeyEventArgs(Keys.
None
) };
System\Windows\Forms\TabControlTests.cs (3)
4017
yield return new object[] { Keys.
None
, false };
4042
yield return new object[] { Keys.Control | Keys.
None
, false };
4071
yield return new object[] { Keys.Alt | Keys.
None
, false };
System\Windows\Forms\ToolStripButtonTests.cs (2)
1673
[InlineData(Keys.
None
)]
1674
[InlineData((Keys.
None
- 1))]
System\Windows\Forms\ToolStripControlHostTests.cs (8)
4194
[InlineData(Keys.
None
)]
4198
[InlineData((Keys.
None
- 1))]
4235
[InlineData(Keys.
None
)]
4239
[InlineData((Keys.
None
- 1))]
4251
[InlineData(Keys.
None
)]
4255
[InlineData((Keys.
None
- 1))]
4295
[InlineData(Keys.
None
)]
4299
[InlineData((Keys.
None
- 1))]
System\Windows\Forms\ToolStripItemTests.cs (6)
10358
[InlineData(Keys.
None
)]
10362
[InlineData((Keys.
None
- 1))]
13947
[InlineData(Keys.
None
)]
13951
[InlineData((Keys.
None
- 1))]
14041
[InlineData(Keys.
None
)]
14042
[InlineData((Keys.
None
- 1))]
System\Windows\Forms\ToolStripMenuItemTests.cs (2)
87
Assert.Equal(Keys.
None
, item.ShortcutKeys);
123
[InlineData(Keys.
None
)]
System\Windows\Forms\TreeViewTests.cs (4)
5732
yield return new object[] { new KeyEventArgs(Keys.
None
) };
5764
yield return new object[] { false, true, false, new KeyEventArgs(Keys.
None
), 0, 0, false };
5897
yield return new object[] { true, new KeyEventArgs(Keys.
None
), true };
5902
yield return new object[] { false, new KeyEventArgs(Keys.
None
), false };
TextBoxBaseTests.cs (1)
5810
yield return new object[] { shortcutsEnabled, readOnly, Keys.
None
, false };
System.Windows.Forms.TestUtilities (1)
CommonTestHelperEx.cs (1)
124
new(Keys.
None
),
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
907
if ((keyData & (Keys.Alt | Keys.Control)) == Keys.
None
)