236 references to Alt
DesignSurface (1)
MainForm.Designer.cs (1)
252
this.ToolStripMenuItemKeyInvokeSmartTag.ShortcutKeys = System.Windows.Forms.Keys.
Alt
| System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F10;
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\Devices\Keyboard.vb (1)
22
Return CType(keys And Keys.
Alt
, Boolean)
System.Windows.Forms (104)
System\Windows\Forms\Control.cs (3)
2526
modifiers |= Keys.
Alt
;
6222
if ((keyData & Keys.
Alt
) == Keys.
Alt
)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (3)
2020
Debug.Assert((ModifierKeys & Keys.
Alt
) == 0);
2038
Debug.Assert((ModifierKeys & Keys.
Alt
) == 0);
2136
Keys keyCode = keyData & (Keys.KeyCode | Keys.
Alt
);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (18)
10070
if ((keyData & Keys.
Alt
) == Keys.
Alt
)
10089
if ((keyData & (Keys.Control | Keys.Shift | Keys.
Alt
)) == Keys.Control)
10100
if ((keyData & (Keys.Control | Keys.Shift | Keys.
Alt
)) == Keys.Control)
10110
if ((keyData & (Keys.Control | Keys.Shift | Keys.
Alt
)) == Keys.Shift
11899
bool isControlDown = (nModifier & Keys.Control) == Keys.Control && (nModifier & Keys.
Alt
) == 0;
11901
bool isAltDown = (nModifier & Keys.
Alt
) == Keys.
Alt
;
15767
if (_dataGridViewOper[OperationTrackKeyboardColResize] && (e.KeyData & Keys.
Alt
) != Keys.
Alt
)
16463
if ((ModifierKeys & (Keys.Shift | Keys.
Alt
)) != 0 || MouseButtons != MouseButtons.None)
19927
if ((keyData & (Keys.Shift | Keys.Control | Keys.
Alt
)) == Keys.Control && MultiSelect)
21867
if (((keyData & (Keys.Shift | Keys.Control | Keys.
Alt
)) == Keys.Control
21868
|| ((keyData & (Keys.Shift | Keys.Control | Keys.
Alt
)) == (Keys.Control | Keys.Shift)
22014
if ((keyData & Keys.
Alt
) == Keys.
Alt
&& AllowUserToResizeColumns && _ptCurrentCell.X != -1)
24268
if ((keyData & (Keys.Control | Keys.Shift | Keys.
Alt
)) == Keys.Shift && _ptCurrentCell.X != -1)
25298
if ((keyData & (Keys.
Alt
| Keys.Shift | Keys.Control)) == Keys.Control && IsCurrentCellInEditMode)
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxEditingControl.cs (1)
204
if ((keyData & (Keys.Control | Keys.Shift | Keys.
Alt
)) == Keys.Shift && Multiline && AcceptsReturn)
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (2)
1032
if ((keyData & Keys.
Alt
) == Keys.
Alt
)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
1408
if ((keyData & (Keys.
Alt
| Keys.Control)) != Keys.
Alt
)
System\Windows\Forms\Controls\ListControl\ListControl.cs (2)
577
if ((keyData & Keys.
Alt
) == Keys.
Alt
)
System\Windows\Forms\Controls\ListView\ListView.cs (2)
4257
if ((keyData & Keys.
Alt
) == Keys.
Alt
)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (2)
1338
if ((keyData & Keys.
Alt
) == Keys.
Alt
)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
3225
|| keyData.HasFlag(Keys.
Alt
))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (4)
2611
if ((ModifierKeys & (Keys.
Alt
| Keys.Control)) != 0)
2913
if (e.KeyData == (Keys.C | Keys.
Alt
| Keys.Shift | Keys.Control))
3117
if ((ModifierKeys & (Keys.Shift | Keys.
Alt
)) != 0 || MouseButtons != MouseButtons.None)
3825
((keyData & Keys.
Alt
) != 0))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
525
if ((keyData & (Keys.Shift | Keys.Control | Keys.
Alt
)) == 0)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.cs (7)
187
if (((keyData & Keys.Control) != 0) && ((keyData & Keys.Shift) == 0) && ((keyData & Keys.
Alt
) == 0))
195
if (((keyData & Keys.Control) != 0) && ((keyData & Keys.Shift) == 0) && ((keyData & Keys.
Alt
) == 0))
204
if (((keyData & Keys.
Alt
) == 0))
215
if (((keyData & Keys.Control) == 0) && ((keyData & Keys.Shift) != 0) && ((keyData & Keys.
Alt
) == 0))
219
else if (((keyData & Keys.Control) == 0) && ((keyData & Keys.Shift) == 0) && ((keyData & Keys.
Alt
) == 0))
244
if ((keyData & (Keys.Shift | Keys.Control | Keys.
Alt
)) == 0)
266
if ((keyData & Keys.KeyCode) == Keys.Tab && ((keyData & (Keys.Control | Keys.
Alt
)) == 0))
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
1179
if ((keyData & Keys.
Alt
) == Keys.
Alt
)
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
535
if (Multiline && (keyData & Keys.
Alt
) == 0)
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (2)
1318
if ((keyData & Keys.
Alt
) != Keys.
Alt
)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
2757
bool hasModifiers = ((keyData & (Keys.
Alt
| Keys.Control)) != Keys.None);
2849
if (!inMenuMode && ModifierKeys == Keys.
Alt
)
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.cs (2)
52
if ((keyData & Keys.
Alt
) == Keys.
Alt
)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (2)
131
if ((Control.ModifierKeys != Keys.
Alt
) &&
152
if ((Control.ModifierKeys != Keys.
Alt
) &&
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
2055
if (Control.ModifierKeys == Keys.
Alt
)
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (3)
842
if ((keyData & Keys.
Alt
) == Keys.
Alt
)
925
if ((ModifierKeys & (Keys.Shift | Keys.
Alt
)) != 0 || MouseButtons != MouseButtons.None)
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
1809
if (_editNode is not null && (keyData & Keys.
Alt
) == 0)
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (1)
477
else if ((ModifierKeys & (Keys.Control | Keys.
Alt
)) != 0)
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
733
if ((ModifierKeys & (Keys.Shift | Keys.
Alt
)) != 0 || MouseButtons != MouseButtons.None)
System\Windows\Forms\Form.cs (1)
4693
if ((keyData & (Keys.
Alt
| Keys.Control)) == Keys.None)
System\Windows\Forms\Input\KeyEventArgs.cs (2)
25
public virtual bool Alt => (KeyData & Keys.
Alt
) == Keys.
Alt
;
System\Windows\Forms\Input\KeysConverter.cs (1)
48
AddLocalizedKey(nameof(SR.toStringAlt), Keys.
Alt
);
System\Windows\Forms\Input\PreviewKeyDownEventArgs.cs (2)
22
public bool Alt => (KeyData & Keys.
Alt
) == Keys.
Alt
;
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
1195
if ((keyData & (Keys.
Alt
| Keys.Control)) == Keys.None)
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
2299
if ((keyData & (Keys.
Alt
| Keys.Control)) == Keys.None)
System\Windows\Forms\MDI\MDIControlStrip.cs (1)
70
_system.ShortcutKeys = Keys.
Alt
| Keys.OemMinus;
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
1008
if ((keyData & (Keys.
Alt
| Keys.Control)) == Keys.None)
System\Windows\Forms\SendKeys\SendKeys.cs (1)
500
if (haveKeys.HaveAlt == 0 && (vk & (int)Keys.
Alt
) != 0)
System\Windows\Forms\Shortcut.cs (27)
545
AltRightArrow = Keys.
Alt
+ Keys.Right,
550
AltLeftArrow = Keys.
Alt
+ Keys.Left,
555
AltUpArrow = Keys.
Alt
+ Keys.Up,
560
AltDownArrow = Keys.
Alt
+ Keys.Down,
565
AltBksp = Keys.
Alt
+ Keys.Back,
570
AltF1 = Keys.
Alt
+ Keys.F1,
575
AltF2 = Keys.
Alt
+ Keys.F2,
580
AltF3 = Keys.
Alt
+ Keys.F3,
585
AltF4 = Keys.
Alt
+ Keys.F4,
590
AltF5 = Keys.
Alt
+ Keys.F5,
595
AltF6 = Keys.
Alt
+ Keys.F6,
600
AltF7 = Keys.
Alt
+ Keys.F7,
605
AltF8 = Keys.
Alt
+ Keys.F8,
610
AltF9 = Keys.
Alt
+ Keys.F9,
615
AltF10 = Keys.
Alt
+ Keys.F10,
620
AltF11 = Keys.
Alt
+ Keys.F11,
625
AltF12 = Keys.
Alt
+ Keys.F12,
630
Alt0 = Keys.
Alt
+ Keys.D0,
635
Alt1 = Keys.
Alt
+ Keys.D1,
640
Alt2 = Keys.
Alt
+ Keys.D2,
645
Alt3 = Keys.
Alt
+ Keys.D3,
650
Alt4 = Keys.
Alt
+ Keys.D4,
655
Alt5 = Keys.
Alt
+ Keys.D5,
660
Alt6 = Keys.
Alt
+ Keys.D6,
665
Alt7 = Keys.
Alt
+ Keys.D7,
670
Alt8 = Keys.
Alt
+ Keys.D8,
675
Alt9 = Keys.
Alt
+ Keys.D9,
System.Windows.Forms.Design (25)
System\ComponentModel\Design\CollectionEditor.FilterListBox.cs (1)
77
if ((ModifierKeys & (Keys.Control | Keys.
Alt
)) != 0)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (4)
312
if (keyData is (Keys.
Alt
| Keys.Down) or (Keys.
Alt
| Keys.Up) or Keys.F4)
327
else if ((keyData & Keys.
Alt
) == Keys.
Alt
)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (2)
127
if (keyData is (Keys.
Alt
| Keys.Down) or (Keys.
Alt
| Keys.Up) or Keys.F4)
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (2)
66
if ((keyData & Keys.KeyCode) == Keys.Return && Multiline && (keyData & Keys.
Alt
) == 0)
76
if ((keyData & (Keys.Shift | Keys.
Alt
)) == 0)
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
336
if ((keyData & Keys.
Alt
) == 0
System\Drawing\Design\CursorEditor.CursorUI.cs (1)
79
if ((keyData & Keys.KeyCode) == Keys.Return && (keyData & (Keys.
Alt
| Keys.Control)) == 0)
System\Drawing\Design\SelectionPanelBase.cs (1)
99
if ((keyData & Keys.KeyCode) == Keys.Tab && (keyData & (Keys.
Alt
| Keys.Control)) == 0)
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (3)
298
if ((keyData & Keys.KeyCode) == Keys.Return && (keyData & (Keys.
Alt
| Keys.Control)) == 0)
304
if ((keyData & Keys.KeyCode) == Keys.Escape && (keyData & (Keys.
Alt
| Keys.Control)) == 0)
310
if ((keyData & Keys.KeyCode) == Keys.Tab && (keyData & (Keys.
Alt
| Keys.Control)) == 0)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
619
bool altKeyPressed = Control.ModifierKeys == Keys.
Alt
;
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (1)
464
bool altKeyPressed = Control.ModifierKeys == Keys.
Alt
;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (1)
304
bool altKeyPressed = Control.ModifierKeys == Keys.
Alt
;
System\Windows\Forms\Design\PbrsForward.cs (1)
136
if ((Control.ModifierKeys & (Keys.Control | Keys.
Alt
)) != 0)
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (5)
275
if ((keyModifiers & (Keys.Control | Keys.
Alt
)) == 0)
287
if ((keyModifiers & (Keys.Control | Keys.
Alt
)) == 0)
306
(keyModifiers & (Keys.Control | Keys.
Alt
)) != 0 ||
328
_altCheckBox.Checked = (keys & Keys.
Alt
) != 0;
369
valueKeys |= Keys.
Alt
;
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
1715
if ((keyData & (Keys.
Alt
| Keys.Control)) == Keys.None)
System.Windows.Forms.Tests (102)
System\Windows\Forms\ControlTests.Methods.cs (29)
4446
yield return new object[] { Keys.
Alt
| Keys.Tab, false };
4447
yield return new object[] { Keys.
Alt
| Keys.Up, false };
4448
yield return new object[] { Keys.
Alt
| Keys.Down, false };
4449
yield return new object[] { Keys.
Alt
| Keys.Left, false };
4450
yield return new object[] { Keys.
Alt
| Keys.Right, false };
4451
yield return new object[] { Keys.
Alt
| Keys.Return, false };
4452
yield return new object[] { Keys.
Alt
| Keys.Escape, false };
4453
yield return new object[] { Keys.
Alt
| Keys.A, false };
4454
yield return new object[] { Keys.
Alt
| Keys.C, false };
4455
yield return new object[] { Keys.
Alt
| Keys.Insert, false };
4456
yield return new object[] { Keys.
Alt
| Keys.Space, false };
4457
yield return new object[] { Keys.
Alt
| Keys.Home, false };
4458
yield return new object[] { Keys.
Alt
| Keys.End, false };
4459
yield return new object[] { Keys.
Alt
| Keys.Back, false };
4460
yield return new object[] { Keys.
Alt
| Keys.Next, false };
4461
yield return new object[] { Keys.
Alt
| Keys.Prior, false };
4462
yield return new object[] { Keys.
Alt
| Keys.Delete, false };
4463
yield return new object[] { Keys.
Alt
| Keys.D0, false };
4464
yield return new object[] { Keys.
Alt
| Keys.NumPad0, false };
4465
yield return new object[] { Keys.
Alt
| Keys.F1, false };
4466
yield return new object[] { Keys.
Alt
| Keys.F2, false };
4467
yield return new object[] { Keys.
Alt
| Keys.F3, false };
4468
yield return new object[] { Keys.
Alt
| Keys.F4, false };
4469
yield return new object[] { Keys.
Alt
| Keys.F10, false };
4470
yield return new object[] { Keys.
Alt
| Keys.RButton, false };
4471
yield return new object[] { Keys.
Alt
| Keys.PageUp, false };
4472
yield return new object[] { Keys.
Alt
| Keys.PageDown, false };
4473
yield return new object[] { Keys.
Alt
| Keys.Menu, false };
4474
yield return new object[] { Keys.
Alt
| Keys.None, false };
System\Windows\Forms\KeyEventArgsTests.cs (6)
12
[InlineData(Keys.
Alt
| Keys.A)]
15
[InlineData(Keys.
Alt
)]
17
[InlineData(Keys.Control | Keys.
Alt
| Keys.Shift | Keys.A)]
21
[InlineData(Keys.Control | Keys.
Alt
| Keys.Shift | (Keys)(0x5D))]
27
Assert.Equal((keyData & Keys.
Alt
) == Keys.
Alt
, e.Alt);
System\Windows\Forms\KeysConverterTests.cs (14)
13
[InlineData("Ctrl+Alt+Shift+A", Keys.Control | Keys.
Alt
| Keys.Shift | Keys.A)]
14
[InlineData("Ctrl+Alt+Shift+F1", Keys.Control | Keys.
Alt
| Keys.Shift | Keys.F1)]
15
[InlineData("Ctrl+Alt+D", Keys.Control | Keys.
Alt
| Keys.D)]
61
[InlineData(Keys.Control | Keys.
Alt
| Keys.D, "Ctrl+Alt+D")]
62
[InlineData(Keys.Control | Keys.
Alt
| Keys.Shift | Keys.A, "Ctrl+Alt+Shift+A")]
63
[InlineData(Keys.Control | Keys.
Alt
| Keys.Shift | Keys.F1, "Ctrl+Alt+Shift+F1")]
64
[InlineData(Keys.F2 | Keys.Shift | Keys.
Alt
| Keys.Control, "Ctrl+Alt+Shift+F2")]
91
yield return new object[] { "ko-KR", Keys.Control | Keys.
Alt
| Keys.D, new Enum[] { Keys.Control, Keys.
Alt
, Keys.D } };
92
yield return new object[] { "ru-RU", Keys.Control | Keys.
Alt
| Keys.Shift | Keys.A, new Enum[] { Keys.Control, Keys.
Alt
, Keys.Shift, Keys.A } };
93
yield return new object[] { "zh-TW", Keys.Control | Keys.
Alt
| Keys.Shift | Keys.F1, new Enum[] { Keys.Control, Keys.
Alt
, Keys.Shift, Keys.F1 } };
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\ListControlTests.cs (2)
2091
[InlineData(Keys.
Alt
, false)]
2092
[InlineData(Keys.
Alt
| Keys.PageUp, false)]
System\Windows\Forms\PreviewKeyDownEventArgsTests.cs (6)
12
[InlineData(Keys.
Alt
| Keys.A)]
15
[InlineData(Keys.
Alt
)]
17
[InlineData(Keys.Control | Keys.
Alt
| Keys.Shift | Keys.A)]
21
[InlineData(Keys.Control | Keys.
Alt
| Keys.Shift | (Keys)(0x5D))]
27
Assert.Equal((keyData & Keys.
Alt
) == Keys.
Alt
, e.Alt);
System\Windows\Forms\TabControlTests.cs (27)
4042
yield return new object[] { Keys.
Alt
| Keys.Tab, false };
4043
yield return new object[] { Keys.
Alt
| Keys.Up, false };
4044
yield return new object[] { Keys.
Alt
| Keys.Down, false };
4045
yield return new object[] { Keys.
Alt
| Keys.Left, false };
4046
yield return new object[] { Keys.
Alt
| Keys.Right, false };
4047
yield return new object[] { Keys.
Alt
| Keys.Return, false };
4048
yield return new object[] { Keys.
Alt
| Keys.Escape, false };
4049
yield return new object[] { Keys.
Alt
| Keys.A, false };
4050
yield return new object[] { Keys.
Alt
| Keys.C, false };
4051
yield return new object[] { Keys.
Alt
| Keys.Insert, false };
4052
yield return new object[] { Keys.
Alt
| Keys.Space, false };
4053
yield return new object[] { Keys.
Alt
| Keys.Home, false };
4054
yield return new object[] { Keys.
Alt
| Keys.End, false };
4056
yield return new object[] { Keys.
Alt
| Keys.Back, false };
4057
yield return new object[] { Keys.
Alt
| Keys.Next, false };
4058
yield return new object[] { Keys.
Alt
| Keys.Prior, false };
4059
yield return new object[] { Keys.
Alt
| Keys.Delete, false };
4060
yield return new object[] { Keys.
Alt
| Keys.D0, false };
4061
yield return new object[] { Keys.
Alt
| Keys.NumPad0, false };
4062
yield return new object[] { Keys.
Alt
| Keys.F1, false };
4063
yield return new object[] { Keys.
Alt
| Keys.F2, false };
4064
yield return new object[] { Keys.
Alt
| Keys.F3, false };
4065
yield return new object[] { Keys.
Alt
| Keys.F4, false };
4066
yield return new object[] { Keys.
Alt
| Keys.RButton, false };
4067
yield return new object[] { Keys.
Alt
| Keys.PageUp, false };
4068
yield return new object[] { Keys.
Alt
| Keys.PageDown, false };
4069
yield return new object[] { Keys.
Alt
| Keys.None, false };
System\Windows\Forms\ToolStripMenuItemTests.cs (5)
127
[InlineData(Keys.Control | Keys.
Alt
| Keys.D)]
128
[InlineData(Keys.Control | Keys.
Alt
| Keys.Shift | Keys.A)]
129
[InlineData(Keys.Control | Keys.
Alt
| Keys.Shift | Keys.F1)]
140
[InlineData(Keys.Control | Keys.
Alt
)]
141
[InlineData(Keys.Control | Keys.
Alt
| Keys.Shift)]
TextBoxBaseTests.cs (11)
5187
yield return new object[] { multiline, acceptsTab, readOnly, Keys.Tab | Keys.
Alt
, false };
5189
yield return new object[] { multiline, acceptsTab, readOnly, Keys.Escape | Keys.
Alt
, false };
5190
yield return new object[] { multiline, acceptsTab, readOnly, Keys.Back | Keys.
Alt
, false };
5192
yield return new object[] { multiline, acceptsTab, readOnly, Keys.PageUp | Keys.
Alt
, false };
5194
yield return new object[] { multiline, acceptsTab, readOnly, Keys.PageDown | Keys.
Alt
, false };
5196
yield return new object[] { multiline, acceptsTab, readOnly, Keys.Home | Keys.
Alt
, false };
5198
yield return new object[] { multiline, acceptsTab, readOnly, Keys.End | Keys.
Alt
, false };
5221
[InlineData(false, true, true, Keys.Down | Keys.
Alt
, false)]
5222
[InlineData(false, true, false, Keys.Down | Keys.
Alt
, false)]
5252
[InlineData(false, true, true, Keys.Down | Keys.
Alt
, false)]
5253
[InlineData(false, true, false, Keys.Down | Keys.
Alt
, false)]
TrackBarTests.cs (2)
2309
[InlineData(Keys.
Alt
, false)]
2310
[InlineData(Keys.
Alt
| Keys.PageUp, false)]
WindowsFormsIntegration (3)
System\Windows\Integration\Convert.cs (2)
196
if ((keyData & SWF.Keys.
Alt
) == SWF.Keys.
Alt
)
System\Windows\Integration\WindowsFormsHost.cs (1)
931
if ((keyData & (Keys.
Alt
| Keys.Control)) == Keys.None)