198 references to Key
PresentationCore (6)
Core\CSharp\System\Windows\Input\Command\KeyGesture.cs (1)
184if(keyEventArgs != null && IsDefinedKey(keyEventArgs.Key))
Core\CSharp\System\Windows\Input\KeyboardDevice.cs (2)
905Key key = previewKeyDown.Key; 960Key key = previewKeyUp.Key;
Core\CSharp\System\Windows\Input\KeyEventArgs.cs (1)
82/// The original key, as opposed to <see cref="Key"/>, which might
Core\CSharp\System\Windows\Input\TextServicesManager.cs (2)
209if(!keyArgs.Handled && keyArgs.Key == Key.ImeProcessed) 226if(!keyArgs.Handled && keyArgs.Key == Key.ImeProcessed)
PresentationFramework (90)
src\Framework\MS\Internal\AppModel\RootBrowserWindow.cs (1)
171if (e.Key == Key.F6 && (e.KeyboardDevice.Modifiers & ~ModifierKeys.Shift) == 0)
src\Framework\MS\Internal\Documents\DocumentViewerHelper.cs (5)
360if (e.Key == Key.Left || e.Key == Key.Right || e.Key == Key.Up || e.Key == Key.Down) 366FocusNavigationDirection direction = KeyboardNavigation.KeyToTraversalDirection(e.Key);
src\Framework\System\Windows\Controls\Calendar.cs (3)
845if (e.Key == Key.LeftShift || e.Key == Key.RightShift) 1269switch (e.Key)
src\Framework\System\Windows\Controls\CheckBox.cs (4)
82if (e.Key == Key.OemPlus || e.Key == Key.Add) 88else if (e.Key == Key.OemMinus || e.Key == Key.Subtract)
src\Framework\System\Windows\Controls\ComboBox.cs (1)
1336Key key = e.Key;
src\Framework\System\Windows\Controls\ContextMenu.cs (2)
430Key key = e.Key; 461if (!e.Handled && IsOpen && e.Key == Key.Apps)
src\Framework\System\Windows\Controls\DataGrid.cs (17)
5520switch (e.Key) 5604DependencyObject nextFocusTarget = this.PredictFocus(KeyToTraversalDirection(e.Key)); 5623if (!controlModifier && (e.Key == Key.Up || e.Key == Key.Down)) 5640if ((e.Key == Key.Up && ItemsControl.EqualsEx(cvg.Items[0], currentInfo.Item)) || 5641(e.Key == Key.Down && ItemsControl.EqualsEx(cvg.Items[cvg.Items.Count - 1], currentInfo.Item))) 5646if (e.Key == Key.Down) 5660if ((e.Key == Key.Up && currentRowIndex == 0) || 5661(e.Key == Key.Down && currentRowIndex == Items.Count - 1)) 5675Key rtlKey = e.Key; 5727MoveFocus(new TraversalRequest(e.Key == Key.Left ? FocusNavigationDirection.Left : FocusNavigationDirection.Right)); 5773MoveFocus(new TraversalRequest(e.Key == Key.Left ? FocusNavigationDirection.Left : FocusNavigationDirection.Right)); 5869TraversalRequest request = new TraversalRequest(KeyToTraversalDirection(e.Key)); 5889(e.Key == Key.Up ? FocusNavigationDirection.Up : FocusNavigationDirection.Down), 6080bool homeKey = (e.Key == Key.Home); 6148int targetIndex = (e.Key == Key.PageUp) ? rowIndex - jumpDistance : rowIndex + jumpDistance; 6182FocusNavigationDirection direction = e.Key == Key.PageUp ? FocusNavigationDirection.Up : FocusNavigationDirection.Down;
src\Framework\System\Windows\Controls\DataGridCheckBoxColumn.cs (1)
212(keyArgs.Key == Key.Space);
src\Framework\System\Windows\Controls\DataGridComboBoxColumn.cs (1)
609Key key = keyArgs.Key;
src\Framework\System\Windows\Controls\DataGridHelper.cs (1)
754return keyArgs.Key == Key.ImeProcessed;
src\Framework\System\Windows\Controls\DatePicker.cs (5)
946if (args.Key == Key.Escape || ((args.Key == Key.Enter || args.Key == Key.Space) && c.DisplayMode == CalendarMode.Month)) 949if (args.Key == Key.Escape) 1146switch (e.Key)
src\Framework\System\Windows\Controls\DocumentViewer.cs (1)
2334if (e.Key == Key.F3)
src\Framework\System\Windows\Controls\FlowDocumentReader.cs (1)
811switch (e.Key)
src\Framework\System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
664switch (e.Key)
src\Framework\System\Windows\Controls\GridSplitter.cs (1)
709Key key = e.Key;
src\Framework\System\Windows\Controls\GridViewColumnHeader.cs (1)
371if (e.Key == Key.Escape && _headerGripper != null && _headerGripper.IsDragging)
src\Framework\System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
1275if (e.Key == Key.Escape && _isHeaderDragging)
src\Framework\System\Windows\Controls\ItemsControl.cs (1)
1709if (e.Key == Key.Back)
src\Framework\System\Windows\Controls\ListBox.cs (2)
314Key key = e.Key; 400if (e.Key == Key.Enter && (bool)GetValue(KeyboardNavigation.AcceptsReturnProperty) == false)
src\Framework\System\Windows\Controls\Menu.cs (1)
210Key key = e.Key;
src\Framework\System\Windows\Controls\MenuItem.cs (2)
1932Key key = e.Key; 2062handled = MenuItemNavigate(e.Key, e.KeyboardDevice.Modifiers);
src\Framework\System\Windows\Controls\PopupControlService.cs (1)
260if (e.Key == Key.Apps)
src\Framework\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)
src\Framework\System\Windows\Controls\Primitives\MenuBase.cs (1)
452Key key = e.Key;
src\Framework\System\Windows\Controls\Primitives\RepeatButton.cs (2)
311if ((e.Key == Key.Space) && (ClickMode != ClickMode.Hover)) 323if ((e.Key == Key.Space) && (ClickMode != ClickMode.Hover))
src\Framework\System\Windows\Controls\ScrollViewer.cs (6)
969if (e.Key == Key.Left || e.Key == Key.Right || e.Key == Key.Up || e.Key == Key.Down) 979FocusNavigationDirection direction = KeyboardNavigation.KeyToTraversalDirection(e.Key); 1095switch (e.Key)
src\Framework\System\Windows\Controls\SinglePageViewer.cs (2)
388if (e.Key == Key.Escape) 398if (e.Key == Key.F3)
src\Framework\System\Windows\Controls\TabControl.cs (1)
425switch (e.Key)
src\Framework\System\Windows\Controls\ToolBar.cs (1)
663switch (e.Key)
src\Framework\System\Windows\Controls\TreeView.cs (4)
520switch (e.Key) 530if (HandleScrollKeys(e.Key)) 539switch (e.Key) 721(e.Key == Key.PageUp ? FocusNavigationDirection.Up : FocusNavigationDirection.Down),
src\Framework\System\Windows\Controls\TreeViewItem.cs (2)
578switch (e.Key) 598if (LogicalLeft(e.Key))
src\Framework\System\Windows\Documents\Hyperlink.cs (2)
745if (!e.Handled && e.Key == Key.Enter) 1024if (!e.Handled && e.Key == Key.Enter)
src\Framework\System\windows\Documents\TextEditorTyping.cs (9)
252if (e.Key != Key.ImeProcessed) 322if ((e.Key == Key.RightShift || e.Key == Key.LeftShift) && // 327else if ((e.Key == Key.RightCtrl || e.Key == Key.LeftCtrl) && // 332else if (e.Key == Key.RightCtrl || e.Key == Key.LeftCtrl) 351switch (e.Key) 357TextEditorTyping.ScheduleInput(This, new KeyUpInputItem(This, e.Key, e.KeyboardDevice.Modifiers));
src\Framework\System\Windows\Input\KeyboardNavigation.cs (3)
1330keyEventArgs.Handled = Navigate(sourceElement, keyEventArgs.Key, keyEventArgs.KeyboardDevice.Modifiers, fromProcessInput: true); 3355return (e.Key == Key.System) ? e.SystemKey : e.Key;
System.Activities.Core.Presentation (30)
System\Activities\Core\Presentation\CaseKeyBox.xaml.cs (2)
331if (e.Key == Key.Escape) 336else if (e.Key == Key.Enter)
System\Activities\Core\Presentation\FlowchartDesigner.xaml.cs (4)
1965if (e.Key == Key.Delete && this.selectedConnector != null && currentSelection.SelectionCount <= 1) 1979else if ((new List<Key> { Key.Left, Key.Right, Key.Up, Key.Down }).Contains(e.Key) 1982KeyboardMove(e.Key); 1996e.Handled = IsResizing && e.Key == Key.Enter;
System\Activities\Core\Presentation\FlowSwitchCaseEditorDialog.cs (2)
97if (e.Key == Key.Enter) 102else if (e.Key == Key.Escape)
System\Activities\Core\Presentation\StartSymbol.xaml.cs (1)
53if (e.Key == Key.Delete)
System\Activities\Core\Presentation\StateContainerEditor.xaml.cs (5)
1431if (e.Key == Key.Enter || e.Key == Key.Return) 2129if (e.Key == Key.Delete && this.selectedConnector != null && currentSelection.SelectionCount <= 1) 2143else if ((new List<Key> { Key.Left, Key.Right, Key.Up, Key.Down }).Contains(e.Key) 2146this.KeyboardMove(e.Key);
System\Activities\Core\Presentation\StateMachineDesigner.xaml.cs (1)
93e.Handled = IsResizing && e.Key == Key.Enter;
System\Activities\Core\Presentation\SwitchDesigner.xaml.cs (2)
350if (sender == e.OriginalSource && (e.Key == Key.Space || e.Key == Key.Enter))
System\Activities\Core\Presentation\TryCatchDesigner.xaml.cs (9)
452if (sender == e.OriginalSource && (e.Key == Key.Space || e.Key == Key.Enter)) 463if (sender == e.OriginalSource && (e.Key == Key.Space || e.Key == Key.Enter)) 473if (sender == e.OriginalSource && (e.Key == Key.Space || e.Key == Key.Enter)) 484if (sender == e.OriginalSource && (e.Key == Key.Space || e.Key == Key.Enter)) 561switch (e.Key)
System\Activities\Presentation\DynamicArgumentDesigner.xaml.cs (1)
183if (args.Key == Key.Escape && !row.IsEditing && this.ParentDialog != null)
System\Activities\Presentation\TypeCollectionDesigner.xaml.cs (1)
121if (args.Key == Key.Escape && !row.IsEditing && this.ParentDialog != null)
System\ServiceModel\Activities\Presentation\ContentCorrelationTypeExpander.xaml.cs (1)
183if (null != item && item.IsSelected && item.IsSelectionActive && Key.Enter == e.Key && Keyboard.Modifiers == ModifierKeys.None)
System\ServiceModel\Activities\Presentation\MessageQueryEditor.xaml.cs (1)
92if (e.Key == Key.Enter && Keyboard.Modifiers == ModifierKeys.None)
System.Activities.Presentation (72)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\CategoryList.cs (8)
759if (e.Key == Key.Left || e.Key == Key.Right || e.Key == Key.Up || e.Key == Key.Down) 774if ((e.Key == Key.Right && !selectionStop.IsExpanded) || 775(e.Key == Key.Left && selectionStop.IsExpanded)) 788SearchDirection direction = e.Key == Key.Up || e.Key == Key.Left ? SearchDirection.Previous : SearchDirection.Next;
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Editors\FlagEditor.xaml.cs (4)
70if (e.Key == Key.Down) 75if (e.Key == Key.Enter || e.Key == Key.Return) 89else if (e.Key == Key.Escape)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\Controls\WorkaroundPopup.cs (1)
128if (e.Key == Key.Escape)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\ValueEditors\ChoiceEditor.cs (9)
736if (e.Key == Key.Return || e.Key == Key.Enter) 746else if (e.Key == Key.Escape) 765if (e.Key == Key.Up || (!this.IsEditable && e.Key == Key.Left)) 770else if (e.Key == Key.Down || (!this.IsEditable && e.Key == Key.Right)) 775else if (!this.IsEditable && e.Key == Key.Home) 780else if (!this.IsEditable && e.Key == Key.End)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\ValueEditors\StringEditor.cs (3)
240if (e.Key == Key.Return || e.Key == Key.Enter) 256else if (e.Key == Key.Escape && this.IsEditing)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\KeyboardEnabledRadioButton.cs (2)
17if (e.Key == Key.Enter || 18e.Key == Key.Return)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Selection\PropertySelection.cs (14)
400if (e.Key == Key.Left || e.Key == Key.Right || e.Key == Key.Up || e.Key == Key.Down || 401e.Key == Key.Tab || e.Key == Key.Escape || e.Key == Key.Return || e.Key == Key.Enter || 402e.Key == Key.PageUp || e.Key == Key.PageDown || e.Key == Key.Home || e.Key == Key.End || e.Key == Key.LeftCtrl || e.Key == Key.RightCtrl)
System.Activities.Presentation\System\Activities\Presentation\DefaultCommandExtensionCallback.cs (1)
177else if (keyArgs.Key == this.chordKey && (Keyboard.Modifiers == ModifierKeys.None || Keyboard.Modifiers == ModifierKeys.Control))
System.Activities.Presentation\System\Activities\Presentation\ErrorReporting.cs (1)
169if (e.Key == Key.Escape)
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\FreeFormPanel.cs (1)
535if (e.Key == Key.Escape)
System.Activities.Presentation\System\Activities\Presentation\Toolbox\ToolboxControl.cs (5)
250switch (e.Key) 270if (((e.Key >= Key.A && e.Key <= Key.Z) || (e.Key >= Key.D0 && e.Key <= Key.D9)) &&
System.Activities.Presentation\System\Activities\Presentation\View\ActivityTypeResolver.xaml.cs (1)
237if (TypePresenter.IsPreviewKey(e.Key))
System.Activities.Presentation\System\Activities\Presentation\View\AnnotationDialog.xaml.cs (1)
43if (e.Key == Key.Escape)
System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (2)
195if (e.Key == Key.Enter || e.Key == Key.Escape)
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.xaml.cs (11)
691if ((e.Key == Key.Up) || (e.Key == Key.Down) || (e.Key == Key.Left) || (e.Key == Key.Right)) 696if (e.Key == Key.Escape) 711switch (e.Key) 921if ((null != keyArgs && keyArgs.Key == Key.Enter && Keyboard.Modifiers == ModifierKeys.None) || null != mouseArgs) 938if (null != breadcrumbItems && breadcrumbItems.Items.Count > 0 && Keyboard.Modifiers == ModifierKeys.None && (e.Key == Key.Left || e.Key == Key.Right)) 945if (e.Key == Key.Right && last.IsKeyboardFocusWithin) 950else if (e.Key == Key.Left && first.IsKeyboardFocusWithin)
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionWindow.cs (1)
509if (e.Key == Key.Escape)
System.Activities.Presentation\System\Activities\Presentation\View\ImportDesigner.xaml.cs (1)
257switch (args.Key)
System.Activities.Presentation\System\Activities\Presentation\View\ScrollViewerPanner.cs (2)
215if (e.Key == Key.Space 233if (e.Key == Key.Space && !this.InPanMode)
System.Activities.Presentation\System\Activities\Presentation\View\TypeBrowser.xaml.cs (2)
184if (e.Key == Key.Escape) 189else if (e.Key == Key.Enter && null != SelectedType)
System.Activities.Presentation\System\Activities\Presentation\View\TypePresenter.xaml.cs (2)
466if (IsPreviewKey(e.Key)) 715if (e.Key == Key.Enter)