167 references to Key
Microsoft.CodeAnalysis.EditorFeatures.Wpf (4)
InlineHints\InlineHintsKeyProcessorProvider.cs (1)
82=> args.SystemKey == key || args.Key == key;
InlineRename\UI\Adornment\RenameFlyout.xaml.cs (3)
173switch (e.Key) 267if (e.Key is Key.Down or Key.Up) 269var newIdentifier = smartRenameViewModel.ScrollSuggestions(currentIdentifier, down: e.Key == Key.Down);
Microsoft.VisualStudio.LanguageServices (3)
InheritanceMargin\MarginGlyph\InheritanceMarginGlyph.cs (1)
207if (e.Key == Key.Escape)
PickMembers\PickMembersDialog.xaml.cs (1)
123if (e.Key == Key.Space && e.KeyboardDevice.Modifiers == ModifierKeys.None)
ValueTracking\ValueTrackingTree.xaml.cs (1)
25e.Handled = e.Handled || e.Key switch
PresentationCore (6)
System\Windows\Input\Command\KeyGesture.cs (1)
178if(keyEventArgs != null && IsDefinedKey(keyEventArgs.Key))
System\Windows\Input\KeyboardDevice.cs (2)
800Key key = previewKeyDown.Key; 855Key key = previewKeyUp.Key;
System\Windows\Input\KeyEventArgs.cs (1)
66/// The original key, as opposed to <see cref="Key"/>, which might
System\Windows\Input\TextServicesManager.cs (2)
189if(!keyArgs.Handled && keyArgs.Key == Key.ImeProcessed) 206if(!keyArgs.Handled && keyArgs.Key == Key.ImeProcessed)
PresentationFramework (94)
MS\Internal\Documents\DocumentViewerHelper.cs (5)
338if (e.Key == Key.Left || e.Key == Key.Right || e.Key == Key.Up || e.Key == Key.Down) 344FocusNavigationDirection direction = KeyboardNavigation.KeyToTraversalDirection(e.Key);
System\Windows\Controls\Calendar.cs (3)
840if (e.Key == Key.LeftShift || e.Key == Key.RightShift) 1264switch (e.Key)
System\Windows\Controls\CheckBox.cs (4)
73if (e.Key == Key.OemPlus || e.Key == Key.Add) 79else if (e.Key == Key.OemMinus || e.Key == Key.Subtract)
System\Windows\Controls\ComboBox.cs (1)
1324Key key = e.Key;
System\Windows\Controls\ContextMenu.cs (2)
418Key key = e.Key; 449if (!e.Handled && IsOpen && e.Key == Key.Apps)
System\Windows\Controls\DataGrid.cs (17)
5512switch (e.Key) 5596DependencyObject nextFocusTarget = this.PredictFocus(KeyToTraversalDirection(e.Key)); 5615if (!controlModifier && (e.Key == Key.Up || e.Key == Key.Down)) 5632if ((e.Key == Key.Up && ItemsControl.EqualsEx(cvg.Items[0], currentInfo.Item)) || 5633(e.Key == Key.Down && ItemsControl.EqualsEx(cvg.Items[cvg.Items.Count - 1], currentInfo.Item))) 5638if (e.Key == Key.Down) 5652if ((e.Key == Key.Up && currentRowIndex == 0) || 5653(e.Key == Key.Down && currentRowIndex == Items.Count - 1)) 5667Key rtlKey = e.Key; 5719MoveFocus(new TraversalRequest(e.Key == Key.Left ? FocusNavigationDirection.Left : FocusNavigationDirection.Right)); 5765MoveFocus(new TraversalRequest(e.Key == Key.Left ? FocusNavigationDirection.Left : FocusNavigationDirection.Right)); 5861TraversalRequest request = new TraversalRequest(KeyToTraversalDirection(e.Key)); 5881(e.Key == Key.Up ? FocusNavigationDirection.Up : FocusNavigationDirection.Down), 6072bool homeKey = (e.Key == Key.Home); 6140int targetIndex = (e.Key == Key.PageUp) ? rowIndex - jumpDistance : rowIndex + jumpDistance; 6174FocusNavigationDirection direction = e.Key == Key.PageUp ? FocusNavigationDirection.Up : FocusNavigationDirection.Down;
System\Windows\Controls\DataGridCell.cs (1)
998if (e.Key == Key.F3 && Column != null && Column.CanUserSort)
System\Windows\Controls\DataGridCheckBoxColumn.cs (1)
216(keyArgs.Key == Key.Space);
System\Windows\Controls\DataGridComboBoxColumn.cs (1)
603Key key = keyArgs.Key;
System\Windows\Controls\DataGridHelper.cs (1)
749return keyArgs.Key == Key.ImeProcessed;
System\Windows\Controls\DatePicker.cs (5)
953if (args.Key == Key.Escape || ((args.Key == Key.Enter || args.Key == Key.Space) && c.DisplayMode == CalendarMode.Month)) 956if (args.Key == Key.Escape) 1153switch (e.Key)
System\Windows\Controls\DocumentViewer.cs (1)
2257if (e.Key == Key.F3)
System\Windows\Controls\FlowDocumentReader.cs (1)
800switch (e.Key)
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
655switch (e.Key)
System\Windows\Controls\GridSplitter.cs (1)
701Key key = e.Key;
System\Windows\Controls\GridViewColumnHeader.cs (1)
364if (e.Key == Key.Escape && _headerGripper != null && _headerGripper.IsDragging)
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
1269if (e.Key == Key.Escape && _isHeaderDragging)
System\Windows\Controls\ItemsControl.cs (1)
1697if (e.Key == Key.Back)
System\Windows\Controls\ListBox.cs (2)
310Key key = e.Key; 396if (e.Key == Key.Enter && (bool)GetValue(KeyboardNavigation.AcceptsReturnProperty) == false)
System\Windows\Controls\Menu.cs (1)
184Key key = e.Key;
System\Windows\Controls\MenuItem.cs (2)
1880Key key = e.Key; 2010handled = MenuItemNavigate(e.Key, e.KeyboardDevice.Modifiers);
System\Windows\Controls\PopupControlService.cs (5)
233(e.Key == Key.LeftCtrl || e.Key == Key.RightCtrl)) 235_lastCtrlKeyDown = e.Key; 245if (e.Key == Key.Apps) 251if ((_lastCtrlKeyDown != Key.None) && (e.Key == _lastCtrlKeyDown) &&
System\Windows\Controls\Primitives\ButtonBase.cs (3)
601if (e.Key == Key.Space) 621else if (e.Key == Key.Enter && (bool)GetValue(KeyboardNavigation.AcceptsReturnProperty)) 665if ((e.Key == Key.Space) && IsSpaceKeyDown)
System\Windows\Controls\Primitives\MenuBase.cs (1)
439Key key = e.Key;
System\Windows\Controls\Primitives\RepeatButton.cs (2)
302if ((e.Key == Key.Space) && (ClickMode != ClickMode.Hover)) 314if ((e.Key == Key.Space) && (ClickMode != ClickMode.Hover))
System\Windows\Controls\ScrollViewer.cs (6)
934if (e.Key == Key.Left || e.Key == Key.Right || e.Key == Key.Up || e.Key == Key.Down) 944FocusNavigationDirection direction = KeyboardNavigation.KeyToTraversalDirection(e.Key); 1060switch (e.Key)
System\Windows\Controls\SinglePageViewer.cs (2)
378if (e.Key == Key.Escape) 388if (e.Key == Key.F3)
System\Windows\Controls\TabControl.cs (1)
414switch (e.Key)
System\Windows\Controls\ToolBar.cs (1)
644switch (e.Key)
System\Windows\Controls\TreeView.cs (4)
514switch (e.Key) 524if (HandleScrollKeys(e.Key)) 533switch (e.Key) 714(e.Key == Key.PageUp ? FocusNavigationDirection.Up : FocusNavigationDirection.Down),
System\Windows\Controls\TreeViewItem.cs (2)
573switch (e.Key) 593if (LogicalLeft(e.Key))
System\Windows\Documents\Hyperlink.cs (2)
700if (!e.Handled && e.Key == Key.Enter) 948if (!e.Handled && e.Key == Key.Enter)
System\windows\Documents\TextEditorTyping.cs (9)
239if (e.Key != Key.ImeProcessed) 309if ((e.Key == Key.RightShift || e.Key == Key.LeftShift) && // 314else if ((e.Key == Key.RightCtrl || e.Key == Key.LeftCtrl) && // 319else if (e.Key == Key.RightCtrl || e.Key == Key.LeftCtrl) 337switch (e.Key) 343TextEditorTyping.ScheduleInput(This, new KeyUpInputItem(This, e.Key, e.KeyboardDevice.Modifiers));
System\Windows\Input\KeyboardNavigation.cs (3)
1235keyEventArgs.Handled = Navigate(sourceElement, keyEventArgs.Key, keyEventArgs.KeyboardDevice.Modifiers, fromProcessInput: true); 3252return (e.Key == Key.System) ? e.SystemKey : e.Key;
PresentationUI (6)
MS\Internal\Documents\Application\PageTextBox.cs (1)
200switch (e.Key)
MS\Internal\Documents\Application\ZoomComboBox.cs (1)
262switch (e.Key)
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (2)
591if (e.Key == Key.Escape) 1244!menuItem.IsSubmenuOpen && e.Key == Key.Escape)
MS\Internal\Documents\FindToolBar.xaml.cs (2)
245(e.Key == Key.Return || e.Key == Key.Execute))
System.Windows.Controls.Ribbon (54)
Microsoft\Windows\Controls\KeyTipService.cs (4)
633return ((e.Key == Key.System) && 643switch (e.Key) 728if (keyArgs.Key == Key.Escape) 740keyArgs.Key == Key.System &&
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (4)
1879if (e.Key == Key.Escape) 1883else if ((e.Key == Key.Left || e.Key == Key.Right) && 1886e.Handled = OnArrowControlKeyDown(e.Key);
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenu.cs (6)
443if (e.Key == Key.Down) 469else if (e.Key == Key.Up) 511else if (e.Key == Key.Left || 512e.Key == Key.Right) 517if ((e.Key == Key.Left) == (FlowDirection == FlowDirection.LeftToRight)) 538else if (e.Key == Key.Left)
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (6)
931if ((e.Key == Key.Escape) && 943if ((e.Key == Key.F4) && 972Key key = e.Key; 1009Key key = e.Key; 1212if (e.Key == Key.Space || 1213e.Key == Key.Enter)
Microsoft\Windows\Controls\Ribbon\RibbonContextMenu.cs (1)
161if (e.Key == Key.Escape)
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (7)
2679if (e.Key == Key.Down || e.Key == Key.Up) 2681FocusNavigationDirection direction = (e.Key == Key.Down) ? FocusNavigationDirection.Down : FocusNavigationDirection.Up; 2700else if ((e.Key == Key.Left) == (FlowDirection == FlowDirection.LeftToRight)) 2745else if (e.Key == Key.PageDown || e.Key == Key.PageUp) 2747FocusNavigationDirection direction = e.Key == Key.PageDown ? FocusNavigationDirection.Down : FocusNavigationDirection.Up;
Microsoft\Windows\Controls\Ribbon\RibbonGalleryItem.cs (3)
414if (e.Key == Key.Space) 426else if (e.Key == Key.Enter) 447if (e.Key == Key.Space)
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (5)
1253Key key = e.Key; 2442if (e.Key == Key.Up || 2443e.Key == Key.Down) 2448if (RibbonHelper.IsEndFocusableMenuItem(menuItem, e.Key == Key.Up /* isFirst */)) 2450if (e.Key == Key.Down)
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (5)
734if (e.Key == Key.Space || 735e.Key == Key.Enter) 754if (e.Key == Key.Space || 755e.Key == Key.Enter) 805switch (e.Key)
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (7)
815Key key = e.Key; 862if (e.Key == Key.Right) 939if (e.Key == Key.Space) 947e.Key != Key.Left && 948e.Key != Key.Right && 949e.Key != Key.Tab) 955if (e.Key == _handleNextUpKey)
Microsoft\Windows\Controls\Ribbon\RibbonSplitMenuItem.cs (1)
183if (HasItems && e.Key == Key.Enter)
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
378if (e.Key == Key.Up && focusedElement != null && tabHeader != null)
Microsoft\Windows\Controls\Ribbon\RibbonTabHeader.cs (3)
349if (e.Key == Key.Down) 362else if (e.Key == Key.Space || 363e.Key == Key.Enter)
Microsoft\Windows\Controls\Ribbon\RibbonTextBox.cs (1)
150if (e.Key == Key.Enter)