133 references to None
System.Windows.Forms (30)
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
1864
if (keyCode == Keys.Insert && e.Modifiers == Keys.
None
&& _insertMode == InsertKeyMode.Default)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
2722
&& ToolStripManager.SelectNextToolStrip(this, forward: (keyData & Keys.Shift) == Keys.
None
))
2759
bool hasModifiers = ((keyData & (Keys.Alt | Keys.Control)) != Keys.
None
);
2778
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)
675
if (shortcut == Keys.
None
)
688
else if ((keyCode != Keys.
None
) && (modifiers != Keys.
None
))
937
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)
1195
if ((keyData & (Keys.Alt | Keys.Control)) == Keys.
None
)
1201
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 (69)
System\Windows\Forms\ButtonBaseTests.cs (1)
5747
yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.
None
) };
System\Windows\Forms\ControlTests.Methods.cs (31)
4414
yield return new object[] { Keys.
None
, false };
4444
yield return new object[] { Keys.Control | Keys.
None
, false };
4474
yield return new object[] { Keys.Alt | Keys.
None
, false };
5290
yield return new object[] { 0, Keys.
None
, false };
5296
yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.
None
, false };
5302
yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.
None
, false };
5308
yield return new object[] { (int)PInvokeCore.WM_KEYUP, Keys.
None
, false };
5314
yield return new object[] { (int)PInvokeCore.WM_SYSKEYUP, Keys.
None
, false };
5320
yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.
None
, true };
5326
yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.
None
, false };
5332
yield return new object[] { (int)PInvokeCore.WM_KEYUP, Keys.
None
, false };
5338
yield return new object[] { (int)PInvokeCore.WM_SYSKEYUP, Keys.
None
, false };
5379
yield return new object[] { 0, Keys.
None
, false, false, false, false, false, false, 0, 0, 0, 0, 0 };
5382
yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.
None
, true, false, false, false, false, true, 1, 0, 0, 0, 0 };
5383
yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.
None
, false, true, false, false, false, false, 1, 1, 0, 0, 0 };
5384
yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.
None
, false, false, true, false, false, true, 1, 1, 1, 0, 0 };
5385
yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.
None
, false, false, false, false, false, false, 1, 1, 1, 0, 0 };
5391
yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.
None
, true, false, false, false, false, true, 1, 0, 0, 0, 0 };
5392
yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.
None
, false, true, false, false, false, false, 1, 1, 0, 0, 0 };
5393
yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.
None
, false, false, true, false, false, true, 1, 1, 1, 0, 0 };
5394
yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.
None
, false, false, false, false, false, false, 1, 1, 1, 0, 0 };
5400
yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.
None
, false, false, false, true, false, false, 0, 0, 0, 1, 0 };
5401
yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.
None
, false, false, false, true, true, false, 0, 0, 0, 1, 0 };
5402
yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.
None
, false, false, false, false, true, true, 0, 0, 0, 1, 1 };
5403
yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.
None
, false, false, false, false, false, false, 0, 0, 0, 1, 1 };
5409
yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.
None
, false, false, false, true, false, false, 0, 0, 0, 0, 1 };
5410
yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.
None
, false, false, false, true, true, true, 0, 0, 0, 0, 1 };
5411
yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.
None
, false, false, false, false, true, true, 0, 0, 0, 0, 1 };
5412
yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.
None
, false, false, false, false, false, false, 0, 0, 0, 0, 1 };
5418
yield return new object[] { (int)PInvokeCore.WM_KEYUP, Keys.
None
, false, false, false, false, false, false, 0, 0, 0, 0, 0 };
5421
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)
40
Assert.Equal(Keys.
None
, e.KeyCode);
System\Windows\Forms\KeysConverterTests.cs (8)
18
[InlineData("None", Keys.
None
)]
27
[InlineData("fr-FR", "(aucun)", Keys.
None
)]
28
[InlineData("nb-NO", "None", Keys.
None
)]
57
[InlineData(Keys.
None
, "(none)")]
73
[InlineData("fr-FR", Keys.
None
, "(aucun)")]
87
yield return new object[] { "fr-FR", Keys.
None
, new Enum[] { Keys.
None
} };
146
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\PreviewKeyDownEventArgsTests.cs (1)
39
Assert.Equal(Keys.
None
, e.KeyCode);
System\Windows\Forms\SplitterTests.cs (1)
1820
yield return new object[] { new KeyEventArgs(Keys.
None
) };
System\Windows\Forms\TabControlTests.cs (3)
4015
yield return new object[] { Keys.
None
, false };
4040
yield return new object[] { Keys.Control | Keys.
None
, false };
4069
yield return new object[] { Keys.Alt | Keys.
None
, false };
System\Windows\Forms\ToolStripButtonTests.cs (2)
1671
[InlineData(Keys.
None
)]
1672
[InlineData((Keys.
None
- 1))]
System\Windows\Forms\ToolStripControlHostTests.cs (8)
4192
[InlineData(Keys.
None
)]
4196
[InlineData((Keys.
None
- 1))]
4233
[InlineData(Keys.
None
)]
4237
[InlineData((Keys.
None
- 1))]
4249
[InlineData(Keys.
None
)]
4253
[InlineData((Keys.
None
- 1))]
4293
[InlineData(Keys.
None
)]
4297
[InlineData((Keys.
None
- 1))]
System\Windows\Forms\ToolStripItemTests.cs (6)
10375
[InlineData(Keys.
None
)]
10379
[InlineData((Keys.
None
- 1))]
13964
[InlineData(Keys.
None
)]
13968
[InlineData((Keys.
None
- 1))]
14058
[InlineData(Keys.
None
)]
14059
[InlineData((Keys.
None
- 1))]
System\Windows\Forms\ToolStripMenuItemTests.cs (2)
89
Assert.Equal(Keys.
None
, item.ShortcutKeys);
125
[InlineData(Keys.
None
)]
System\Windows\Forms\TreeViewTests.cs (4)
5730
yield return new object[] { new KeyEventArgs(Keys.
None
) };
5762
yield return new object[] { false, true, false, new KeyEventArgs(Keys.
None
), 0, 0, false };
5895
yield return new object[] { true, new KeyEventArgs(Keys.
None
), true };
5900
yield return new object[] { false, new KeyEventArgs(Keys.
None
), false };
TextBoxBaseTests.cs (1)
5808
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)
931
if ((keyData & (Keys.Alt | Keys.Control)) == Keys.
None
)