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)
122if (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)
181if(keyEventArgs != null && IsDefinedKey(keyEventArgs.Key))
System\Windows\Input\KeyboardDevice.cs (2)
809Key key = previewKeyDown.Key; 864Key key = previewKeyUp.Key;
System\Windows\Input\KeyEventArgs.cs (1)
72/// The original key, as opposed to <see cref="Key"/>, which might
System\Windows\Input\TextServicesManager.cs (2)
192if(!keyArgs.Handled && keyArgs.Key == Key.ImeProcessed) 209if(!keyArgs.Handled && keyArgs.Key == Key.ImeProcessed)
PresentationFramework (94)
MS\Internal\Documents\DocumentViewerHelper.cs (5)
340if (e.Key == Key.Left || e.Key == Key.Right || e.Key == Key.Up || e.Key == Key.Down) 346FocusNavigationDirection direction = KeyboardNavigation.KeyToTraversalDirection(e.Key);
System\Windows\Controls\Calendar.cs (3)
844if (e.Key == Key.LeftShift || e.Key == Key.RightShift) 1268switch (e.Key)
System\Windows\Controls\CheckBox.cs (4)
81if (e.Key == Key.OemPlus || e.Key == Key.Add) 87else if (e.Key == Key.OemMinus || e.Key == Key.Subtract)
System\Windows\Controls\ComboBox.cs (1)
1334Key key = e.Key;
System\Windows\Controls\ContextMenu.cs (2)
426Key key = e.Key; 457if (!e.Handled && IsOpen && e.Key == Key.Apps)
System\Windows\Controls\DataGrid.cs (17)
5515switch (e.Key) 5599DependencyObject nextFocusTarget = this.PredictFocus(KeyToTraversalDirection(e.Key)); 5618if (!controlModifier && (e.Key == Key.Up || e.Key == Key.Down)) 5635if ((e.Key == Key.Up && ItemsControl.EqualsEx(cvg.Items[0], currentInfo.Item)) || 5636(e.Key == Key.Down && ItemsControl.EqualsEx(cvg.Items[cvg.Items.Count - 1], currentInfo.Item))) 5641if (e.Key == Key.Down) 5655if ((e.Key == Key.Up && currentRowIndex == 0) || 5656(e.Key == Key.Down && currentRowIndex == Items.Count - 1)) 5670Key rtlKey = e.Key; 5722MoveFocus(new TraversalRequest(e.Key == Key.Left ? FocusNavigationDirection.Left : FocusNavigationDirection.Right)); 5768MoveFocus(new TraversalRequest(e.Key == Key.Left ? FocusNavigationDirection.Left : FocusNavigationDirection.Right)); 5864TraversalRequest request = new TraversalRequest(KeyToTraversalDirection(e.Key)); 5884(e.Key == Key.Up ? FocusNavigationDirection.Up : FocusNavigationDirection.Down), 6075bool homeKey = (e.Key == Key.Home); 6143int targetIndex = (e.Key == Key.PageUp) ? rowIndex - jumpDistance : rowIndex + jumpDistance; 6177FocusNavigationDirection direction = e.Key == Key.PageUp ? FocusNavigationDirection.Up : FocusNavigationDirection.Down;
System\Windows\Controls\DataGridCell.cs (1)
1005if (e.Key == Key.F3 && Column != null && Column.CanUserSort)
System\Windows\Controls\DataGridCheckBoxColumn.cs (1)
220(keyArgs.Key == Key.Space);
System\Windows\Controls\DataGridComboBoxColumn.cs (1)
607Key key = keyArgs.Key;
System\Windows\Controls\DataGridHelper.cs (1)
755return keyArgs.Key == Key.ImeProcessed;
System\Windows\Controls\DatePicker.cs (5)
957if (args.Key == Key.Escape || ((args.Key == Key.Enter || args.Key == Key.Space) && c.DisplayMode == CalendarMode.Month)) 960if (args.Key == Key.Escape) 1157switch (e.Key)
System\Windows\Controls\DocumentViewer.cs (1)
2269if (e.Key == Key.F3)
System\Windows\Controls\FlowDocumentReader.cs (1)
805switch (e.Key)
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
658switch (e.Key)
System\Windows\Controls\GridSplitter.cs (1)
707Key key = e.Key;
System\Windows\Controls\GridViewColumnHeader.cs (1)
368if (e.Key == Key.Escape && _headerGripper != null && _headerGripper.IsDragging)
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
1272if (e.Key == Key.Escape && _isHeaderDragging)
System\Windows\Controls\ItemsControl.cs (1)
1706if (e.Key == Key.Back)
System\Windows\Controls\ListBox.cs (2)
316Key key = e.Key; 402if (e.Key == Key.Enter && (bool)GetValue(KeyboardNavigation.AcceptsReturnProperty) == false)
System\Windows\Controls\Menu.cs (1)
194Key key = e.Key;
System\Windows\Controls\MenuItem.cs (2)
1890Key key = e.Key; 2020handled = MenuItemNavigate(e.Key, e.KeyboardDevice.Modifiers);
System\Windows\Controls\PopupControlService.cs (5)
243(e.Key == Key.LeftCtrl || e.Key == Key.RightCtrl)) 245_lastCtrlKeyDown = e.Key; 255if (e.Key == Key.Apps) 261if ((_lastCtrlKeyDown != Key.None) && (e.Key == _lastCtrlKeyDown) &&
System\Windows\Controls\Primitives\ButtonBase.cs (3)
612if (e.Key == Key.Space) 632else if (e.Key == Key.Enter && (bool)GetValue(KeyboardNavigation.AcceptsReturnProperty)) 676if ((e.Key == Key.Space) && IsSpaceKeyDown)
System\Windows\Controls\Primitives\MenuBase.cs (1)
448Key key = e.Key;
System\Windows\Controls\Primitives\RepeatButton.cs (2)
311if ((e.Key == Key.Space) && (ClickMode != ClickMode.Hover)) 323if ((e.Key == Key.Space) && (ClickMode != ClickMode.Hover))
System\Windows\Controls\ScrollViewer.cs (6)
942if (e.Key == Key.Left || e.Key == Key.Right || e.Key == Key.Up || e.Key == Key.Down) 952FocusNavigationDirection direction = KeyboardNavigation.KeyToTraversalDirection(e.Key); 1068switch (e.Key)
System\Windows\Controls\SinglePageViewer.cs (2)
381if (e.Key == Key.Escape) 391if (e.Key == Key.F3)
System\Windows\Controls\TabControl.cs (1)
424switch (e.Key)
System\Windows\Controls\ToolBar.cs (1)
653switch (e.Key)
System\Windows\Controls\TreeView.cs (4)
519switch (e.Key) 529if (HandleScrollKeys(e.Key)) 538switch (e.Key) 719(e.Key == Key.PageUp ? FocusNavigationDirection.Up : FocusNavigationDirection.Down),
System\Windows\Controls\TreeViewItem.cs (2)
577switch (e.Key) 597if (LogicalLeft(e.Key))
System\Windows\Documents\Hyperlink.cs (2)
706if (!e.Handled && e.Key == Key.Enter) 954if (!e.Handled && e.Key == Key.Enter)
System\windows\Documents\TextEditorTyping.cs (9)
248if (e.Key != Key.ImeProcessed) 318if ((e.Key == Key.RightShift || e.Key == Key.LeftShift) && // 323else if ((e.Key == Key.RightCtrl || e.Key == Key.LeftCtrl) && // 328else if (e.Key == Key.RightCtrl || e.Key == Key.LeftCtrl) 346switch (e.Key) 352TextEditorTyping.ScheduleInput(This, new KeyUpInputItem(This, e.Key, e.KeyboardDevice.Modifiers));
System\Windows\Input\KeyboardNavigation.cs (3)
1245keyEventArgs.Handled = Navigate(sourceElement, keyEventArgs.Key, keyEventArgs.KeyboardDevice.Modifiers, fromProcessInput: true); 3262return (e.Key == Key.System) ? e.SystemKey : e.Key;
PresentationUI (6)
MS\Internal\Documents\Application\PageTextBox.cs (1)
202switch (e.Key)
MS\Internal\Documents\Application\ZoomComboBox.cs (1)
264switch (e.Key)
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (2)
598if (e.Key == Key.Escape) 1251!menuItem.IsSubmenuOpen && e.Key == Key.Escape)
MS\Internal\Documents\FindToolBar.xaml.cs (2)
257(e.Key == Key.Return || e.Key == Key.Execute))
System.Windows.Controls.Ribbon (54)
Microsoft\Windows\Controls\KeyTipService.cs (4)
635return ((e.Key == Key.System) && 645switch (e.Key) 730if (keyArgs.Key == Key.Escape) 742keyArgs.Key == Key.System &&
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (4)
1882if (e.Key == Key.Escape) 1886else if ((e.Key == Key.Left || e.Key == Key.Right) && 1889e.Handled = OnArrowControlKeyDown(e.Key);
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenu.cs (6)
445if (e.Key == Key.Down) 471else if (e.Key == Key.Up) 513else if (e.Key == Key.Left || 514e.Key == Key.Right) 519if ((e.Key == Key.Left) == (FlowDirection == FlowDirection.LeftToRight)) 540else if (e.Key == Key.Left)
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (6)
933if ((e.Key == Key.Escape) && 945if ((e.Key == Key.F4) && 974Key key = e.Key; 1011Key key = e.Key; 1214if (e.Key == Key.Space || 1215e.Key == Key.Enter)
Microsoft\Windows\Controls\Ribbon\RibbonContextMenu.cs (1)
163if (e.Key == Key.Escape)
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (7)
2681if (e.Key == Key.Down || e.Key == Key.Up) 2683FocusNavigationDirection direction = (e.Key == Key.Down) ? FocusNavigationDirection.Down : FocusNavigationDirection.Up; 2702else if ((e.Key == Key.Left) == (FlowDirection == FlowDirection.LeftToRight)) 2747else if (e.Key == Key.PageDown || e.Key == Key.PageUp) 2749FocusNavigationDirection direction = e.Key == Key.PageDown ? FocusNavigationDirection.Down : FocusNavigationDirection.Up;
Microsoft\Windows\Controls\Ribbon\RibbonGalleryItem.cs (3)
416if (e.Key == Key.Space) 428else if (e.Key == Key.Enter) 449if (e.Key == Key.Space)
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (5)
1258Key key = e.Key; 2447if (e.Key == Key.Up || 2448e.Key == Key.Down) 2453if (RibbonHelper.IsEndFocusableMenuItem(menuItem, e.Key == Key.Up /* isFirst */)) 2455if (e.Key == Key.Down)
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (5)
737if (e.Key == Key.Space || 738e.Key == Key.Enter) 757if (e.Key == Key.Space || 758e.Key == Key.Enter) 808switch (e.Key)
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (7)
818Key key = e.Key; 865if (e.Key == Key.Right) 942if (e.Key == Key.Space) 950e.Key != Key.Left && 951e.Key != Key.Right && 952e.Key != Key.Tab) 958if (e.Key == _handleNextUpKey)
Microsoft\Windows\Controls\Ribbon\RibbonSplitMenuItem.cs (1)
186if (HasItems && e.Key == Key.Enter)
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
380if (e.Key == Key.Up && focusedElement != null && tabHeader != null)
Microsoft\Windows\Controls\Ribbon\RibbonTabHeader.cs (3)
351if (e.Key == Key.Down) 364else if (e.Key == Key.Space || 365e.Key == Key.Enter)
Microsoft\Windows\Controls\Ribbon\RibbonTextBox.cs (1)
152if (e.Key == Key.Enter)