133 references to None
System.Windows.Forms (30)
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
1864if (keyCode == Keys.Insert && e.Modifiers == Keys.None && _insertMode == InsertKeyMode.Default)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
2720&& ToolStripManager.SelectNextToolStrip(this, forward: (keyData & Keys.Shift) == Keys.None)) 2757bool hasModifiers = ((keyData & (Keys.Alt | Keys.Control)) != Keys.None); 2776retVal = ProcessTabKey((keyData & Keys.Shift) == Keys.None);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (1)
106return (Control.MouseButtons == MouseButtons.Left) && (Control.ModifierKeys == Keys.None);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (4)
675if (shortcut == Keys.None) 688else if ((keyCode != Keys.None) && (modifiers != Keys.None)) 937if (PInvoke.GetKeyState((int)Keys.ShiftKey) < 0 && (keyData == Keys.None))
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (8)
355[DefaultValue(Keys.None)] 359get => Properties.GetValueOrDefault(s_propShortcutKeys, Keys.None); 362if ((value != Keys.None) && !ToolStripManager.IsValidShortcut(value)) 379if (originalShortcut != Keys.None) 395Properties.AddOrRemoveValue(s_propShortcutKeys, value, defaultValue: Keys.None); 570if (shortcut != Keys.None && _lastOwner.Shortcuts.ContainsKey(shortcut)) 921if (shortcut != Keys.None) 1099if (shortcutKeys == Keys.None)
System\Windows\Forms\Form.cs (1)
4693if ((keyData & (Keys.Alt | Keys.Control)) == Keys.None)
System\Windows\Forms\Input\KeyEventArgs.cs (1)
50return Keys.None;
System\Windows\Forms\Input\KeysConverter.cs (5)
63AddLocalizedKey(nameof(SR.toStringNone), Keys.None); 242if (key != Keys.None) 249if (keyValue != Keys.None && modifiers.HasFlag(keyValue)) 290if (key != Keys.None) 297if (keyValue != Keys.None && modifiers.HasFlag(keyValue))
System\Windows\Forms\Input\PreviewKeyDownEventArgs.cs (1)
40return Keys.None;
System\Windows\Forms\Layout\Containers\ContainerControl.cs (2)
1195if ((keyData & (Keys.Alt | Keys.Control)) == Keys.None) 1201if (ProcessTabKey((keyData & Keys.Shift) == Keys.None))
System\Windows\Forms\Layout\Containers\SplitContainer.cs (2)
2299if ((keyData & (Keys.Alt | Keys.Control)) == Keys.None) 2305if (ProcessTabKey((keyData & Keys.Shift) == Keys.None))
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
1008if ((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)
73return Keys.None; 100if (_unknownKeyCode != Keys.None) 103_unknownKeyCode = Keys.None; 326Keys keys = value is Keys keys1 ? keys1 : Keys.None; 332if (keyCode == Keys.None) 361Keys valueKeys = Keys.None; 377if (_unknownKeyCode != Keys.None && cmbKeySelectedIndex == 0) 383valueKeys |= 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] 158if ((item is ToolStripMenuItem menuItem) && shortcut != Keys.None)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
1715if ((keyData & (Keys.Alt | Keys.Control)) == Keys.None) 1721retVal = ProcessTabKey((keyData & Keys.Shift) == Keys.None);
System.Windows.Forms.Tests (69)
System\Windows\Forms\ButtonBaseTests.cs (1)
5747yield return new object[] { flatStyle, enabled, new KeyEventArgs(Keys.None) };
System\Windows\Forms\ControlTests.Methods.cs (31)
4414yield return new object[] { Keys.None, false }; 4444yield return new object[] { Keys.Control | Keys.None, false }; 4474yield return new object[] { Keys.Alt | Keys.None, false }; 5290yield return new object[] { 0, Keys.None, false }; 5296yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.None, false }; 5302yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.None, false }; 5308yield return new object[] { (int)PInvokeCore.WM_KEYUP, Keys.None, false }; 5314yield return new object[] { (int)PInvokeCore.WM_SYSKEYUP, Keys.None, false }; 5320yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.None, true }; 5326yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.None, false }; 5332yield return new object[] { (int)PInvokeCore.WM_KEYUP, Keys.None, false }; 5338yield return new object[] { (int)PInvokeCore.WM_SYSKEYUP, Keys.None, false }; 5379yield return new object[] { 0, Keys.None, false, false, false, false, false, false, 0, 0, 0, 0, 0 }; 5382yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.None, true, false, false, false, false, true, 1, 0, 0, 0, 0 }; 5383yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.None, false, true, false, false, false, false, 1, 1, 0, 0, 0 }; 5384yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.None, false, false, true, false, false, true, 1, 1, 1, 0, 0 }; 5385yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, Keys.None, false, false, false, false, false, false, 1, 1, 1, 0, 0 }; 5391yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.None, true, false, false, false, false, true, 1, 0, 0, 0, 0 }; 5392yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.None, false, true, false, false, false, false, 1, 1, 0, 0, 0 }; 5393yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.None, false, false, true, false, false, true, 1, 1, 1, 0, 0 }; 5394yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, Keys.None, false, false, false, false, false, false, 1, 1, 1, 0, 0 }; 5400yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.None, false, false, false, true, false, false, 0, 0, 0, 1, 0 }; 5401yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.None, false, false, false, true, true, false, 0, 0, 0, 1, 0 }; 5402yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.None, false, false, false, false, true, true, 0, 0, 0, 1, 1 }; 5403yield return new object[] { (int)PInvokeCore.WM_CHAR, Keys.None, false, false, false, false, false, false, 0, 0, 0, 1, 1 }; 5409yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.None, false, false, false, true, false, false, 0, 0, 0, 0, 1 }; 5410yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.None, false, false, false, true, true, true, 0, 0, 0, 0, 1 }; 5411yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.None, false, false, false, false, true, true, 0, 0, 0, 0, 1 }; 5412yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, Keys.None, false, false, false, false, false, false, 0, 0, 0, 0, 1 }; 5418yield return new object[] { (int)PInvokeCore.WM_KEYUP, Keys.None, false, false, false, false, false, false, 0, 0, 0, 0, 0 }; 5421yield 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)
40Assert.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)")] 87yield return new object[] { "fr-FR", Keys.None, new Enum[] { Keys.None } }; 146Keys.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)
39Assert.Equal(Keys.None, e.KeyCode);
System\Windows\Forms\SplitterTests.cs (1)
1820yield return new object[] { new KeyEventArgs(Keys.None) };
System\Windows\Forms\TabControlTests.cs (3)
4015yield return new object[] { Keys.None, false }; 4040yield return new object[] { Keys.Control | Keys.None, false }; 4069yield 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)
10356[InlineData(Keys.None)] 10360[InlineData((Keys.None - 1))] 13945[InlineData(Keys.None)] 13949[InlineData((Keys.None - 1))] 14039[InlineData(Keys.None)] 14040[InlineData((Keys.None - 1))]
System\Windows\Forms\ToolStripMenuItemTests.cs (2)
89Assert.Equal(Keys.None, item.ShortcutKeys); 125[InlineData(Keys.None)]
System\Windows\Forms\TreeViewTests.cs (4)
5730yield return new object[] { new KeyEventArgs(Keys.None) }; 5762yield return new object[] { false, true, false, new KeyEventArgs(Keys.None), 0, 0, false }; 5895yield return new object[] { true, new KeyEventArgs(Keys.None), true }; 5900yield return new object[] { false, new KeyEventArgs(Keys.None), false };
TextBoxBaseTests.cs (1)
5808yield return new object[] { shortcutsEnabled, readOnly, Keys.None, false };
System.Windows.Forms.TestUtilities (1)
CommonTestHelperEx.cs (1)
124new(Keys.None),
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
931if ((keyData & (Keys.Alt | Keys.Control)) == Keys.None)