1 type derived from KeyGesture
System.Activities.Presentation (1)
System.Activities.Presentation\System\Activities\Presentation\DefaultCommandExtensionCallback.cs (1)
120internal sealed class ChordKeyGesture : KeyGesture
63 instantiations of KeyGesture
PresentationCore (4)
Core\CSharp\System\Windows\Input\Command\KeyBinding.cs (2)
71this(command, new KeyGesture(key, modifiers)) 206Gesture = new KeyGesture(key, modifiers, /*validateGesture = */ false);
Core\CSharp\System\Windows\Input\Command\KeyGestureConverter.cs (2)
94return new KeyGesture(Key.None); 134return new KeyGesture((Key)resultkey, modifiers, displayString);
PresentationFramework (44)
src\Framework\MS\Internal\Commands\CommandHelpers.cs (3)
38PrivateRegisterCommandHandler(controlType, command, executedRoutedEventHandler, null, new KeyGesture(key)); 62PrivateRegisterCommandHandler(controlType, command, executedRoutedEventHandler, canExecuteRoutedEventHandler, new KeyGesture(key)); 82PrivateRegisterCommandHandler(controlType, command, executedRoutedEventHandler, canExecuteRoutedEventHandler, new KeyGesture(key, modifierKeys));
src\Framework\System\Windows\Controls\DataGrid.cs (2)
61CommandManager.RegisterClassInputBinding(ownerType, new InputBinding(BeginEditCommand, new KeyGesture(Key.F2))); 66CommandManager.RegisterClassInputBinding(ownerType, new InputBinding(CancelEditCommand, new KeyGesture(Key.Escape)));
src\Framework\System\Windows\Controls\DocumentViewer.cs (16)
1540new KeyGesture(Key.D2, ModifierKeys.Control)); 1670new KeyGesture(Key.Add, ModifierKeys.Control), 1672new KeyGesture(Key.Add, ModifierKeys.Shift | ModifierKeys.Control), 1674new KeyGesture(Key.OemPlus, ModifierKeys.Control), 1676new KeyGesture(Key.OemPlus, ModifierKeys.Shift | ModifierKeys.Control)); 1686new KeyGesture(Key.Subtract, ModifierKeys.Control), 1688new KeyGesture(Key.Subtract, ModifierKeys.Shift | ModifierKeys.Control), 1690new KeyGesture(Key.OemMinus, ModifierKeys.Control), 1692new KeyGesture(Key.OemMinus, ModifierKeys.Shift | ModifierKeys.Control)); 1699new KeyGesture(Key.PageUp, ModifierKeys.Control)); 1706new KeyGesture(Key.PageDown, ModifierKeys.Control)); 1713new KeyGesture(Key.Home, ModifierKeys.Control)); 1720new KeyGesture(Key.End, ModifierKeys.Control)); 1731new KeyGesture(Key.D1, ModifierKeys.Control)); 1741new KeyGesture(Key.D3, ModifierKeys.Control)); 1751new KeyGesture(Key.D4, ModifierKeys.Control));
src\Framework\System\Windows\Controls\FlowDocumentReader.cs (2)
1375executedHandler, canExecuteHandler, new KeyGesture(Key.OemPlus, ModifierKeys.Control)); 1379executedHandler, canExecuteHandler, new KeyGesture(Key.OemMinus, ModifierKeys.Control));
src\Framework\System\Windows\Controls\FlowDocumentScrollViewer.cs (6)
1371executedHandler, canExecuteHandler, new KeyGesture(Key.Home), new KeyGesture(Key.Home, ModifierKeys.Control)); 1375executedHandler, canExecuteHandler, new KeyGesture(Key.End), new KeyGesture(Key.End, ModifierKeys.Control)); 1379executedHandler, canExecuteHandler, new KeyGesture(Key.OemPlus, ModifierKeys.Control)); 1383executedHandler, canExecuteHandler, new KeyGesture(Key.OemMinus, ModifierKeys.Control));
src\Framework\System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1497executedHandler, canExecuteHandler, new KeyGesture(Key.P, ModifierKeys.Control));
src\Framework\System\Windows\Controls\Primitives\ScrollBar.cs (2)
711CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToTopCommand, onScrollCommand, onQueryScrollCommand, new KeyGesture(Key.Home, ModifierKeys.Control)); 712CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToBottomCommand, onScrollCommand, onQueryScrollCommand, new KeyGesture(Key.End, ModifierKeys.Control));
src\Framework\System\Windows\Controls\SinglePageViewer.cs (12)
1273executedHandler, canExecuteHandler, new KeyGesture(Key.OemPlus, ModifierKeys.Control)); 1277executedHandler, canExecuteHandler, new KeyGesture(Key.OemMinus, ModifierKeys.Control)); 1280CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.PreviousPage, new KeyGesture(Key.Left))); 1281CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.PreviousPage, new KeyGesture(Key.Up))); 1282CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.PreviousPage, new KeyGesture(Key.PageUp))); 1283CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.NextPage, new KeyGesture(Key.Right))); 1284CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.NextPage, new KeyGesture(Key.Down))); 1285CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.NextPage, new KeyGesture(Key.PageDown))); 1286CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.FirstPage, new KeyGesture(Key.Home))); 1287CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.FirstPage, new KeyGesture(Key.Home, ModifierKeys.Control))); 1288CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.LastPage, new KeyGesture(Key.End))); 1289CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.LastPage, new KeyGesture(Key.End, ModifierKeys.Control)));
System.Activities.Presentation (15)
System.Activities.Presentation\System\Activities\Presentation\DefaultCommandExtensionCallback.cs (15)
38new KeyGesture(Key.OemPlus, ModifierKeys.Control, "Ctrl +"), 39new KeyGesture(Key.Add, ModifierKeys.Control) }); 42new KeyGesture(Key.OemMinus, ModifierKeys.Control, "Ctrl -"), 43new KeyGesture(Key.Subtract, ModifierKeys.Control) }); 55new List<KeyGesture> { new KeyGesture(Key.F6, ModifierKeys.Control | ModifierKeys.Alt, "Ctrl + Alt + F6") }); 57new List<KeyGesture> { new KeyGesture(Key.Right, ModifierKeys.Alt, "Alt + Right Arrow") }); 59new List<KeyGesture> { new KeyGesture(Key.J, ModifierKeys.Control, "Ctrl + J") }); 69new List<KeyGesture> { new KeyGesture(Key.X, ModifierKeys.Control) }); 71new List<KeyGesture> { new KeyGesture(Key.C, ModifierKeys.Control) }); 73new List<KeyGesture> { new KeyGesture(Key.V, ModifierKeys.Control) }); 75new List<KeyGesture> { new KeyGesture(Key.A, ModifierKeys.Control) }); 77new List<KeyGesture> { new KeyGesture(Key.Z, ModifierKeys.Control) }); 79new List<KeyGesture> { new KeyGesture(Key.Y, ModifierKeys.Control) }); 81new List<KeyGesture> { new KeyGesture(Key.Decimal, ModifierKeys.Alt) }); 83new List<KeyGesture> { new KeyGesture(Key.OemComma, ModifierKeys.Alt) });
157 references to KeyGesture
PresentationCore (103)
Core\CSharp\System\Windows\Input\Command\ApplicationCommands.cs (19)
351KeyGesture.AddGesturesFromResourceStrings( 357KeyGesture.AddGesturesFromResourceStrings( 363KeyGesture.AddGesturesFromResourceStrings( 369KeyGesture.AddGesturesFromResourceStrings( 375KeyGesture.AddGesturesFromResourceStrings( 381KeyGesture.AddGesturesFromResourceStrings( 387KeyGesture.AddGesturesFromResourceStrings( 393KeyGesture.AddGesturesFromResourceStrings( 399KeyGesture.AddGesturesFromResourceStrings( 405KeyGesture.AddGesturesFromResourceStrings( 411KeyGesture.AddGesturesFromResourceStrings( 417KeyGesture.AddGesturesFromResourceStrings( 423KeyGesture.AddGesturesFromResourceStrings( 431KeyGesture.AddGesturesFromResourceStrings( 439KeyGesture.AddGesturesFromResourceStrings( 447KeyGesture.AddGesturesFromResourceStrings( 453KeyGesture.AddGesturesFromResourceStrings( 459KeyGesture.AddGesturesFromResourceStrings( 465KeyGesture.AddGesturesFromResourceStrings(
Core\CSharp\System\Windows\Input\Command\ComponentCommands.cs (27)
351KeyGesture.AddGesturesFromResourceStrings( 357KeyGesture.AddGesturesFromResourceStrings( 363KeyGesture.AddGesturesFromResourceStrings( 369KeyGesture.AddGesturesFromResourceStrings( 375KeyGesture.AddGesturesFromResourceStrings( 381KeyGesture.AddGesturesFromResourceStrings( 387KeyGesture.AddGesturesFromResourceStrings( 393KeyGesture.AddGesturesFromResourceStrings( 399KeyGesture.AddGesturesFromResourceStrings( 405KeyGesture.AddGesturesFromResourceStrings( 411KeyGesture.AddGesturesFromResourceStrings( 417KeyGesture.AddGesturesFromResourceStrings( 423KeyGesture.AddGesturesFromResourceStrings( 429KeyGesture.AddGesturesFromResourceStrings( 435KeyGesture.AddGesturesFromResourceStrings( 441KeyGesture.AddGesturesFromResourceStrings( 447KeyGesture.AddGesturesFromResourceStrings( 453KeyGesture.AddGesturesFromResourceStrings( 459KeyGesture.AddGesturesFromResourceStrings( 465KeyGesture.AddGesturesFromResourceStrings( 471KeyGesture.AddGesturesFromResourceStrings( 477KeyGesture.AddGesturesFromResourceStrings( 483KeyGesture.AddGesturesFromResourceStrings( 489KeyGesture.AddGesturesFromResourceStrings( 495KeyGesture.AddGesturesFromResourceStrings( 501KeyGesture.AddGesturesFromResourceStrings( 507KeyGesture.AddGesturesFromResourceStrings(
Core\CSharp\System\Windows\Input\Command\KeyBinding.cs (6)
59public KeyBinding(ICommand command, KeyGesture gesture) : base(command, gesture) 92return base.Gesture as KeyGesture; 96KeyGesture keyGesture = value as KeyGesture; 104throw new ArgumentException(SR.Get(SRID.InputBinding_ExpectedInputGesture, typeof(KeyGesture))); 179private void SynchronizePropertiesFromGesture(KeyGesture keyGesture)
Core\CSharp\System\Windows\Input\Command\KeyGesture.cs (3)
283KeyGesture keyGesture = CreateFromResourceStrings(keyGestureToken, keyDisplayString); 292internal static KeyGesture CreateFromResourceStrings(string keyGestureToken, string keyDisplayString) 301return _keyGestureConverter.ConvertFromInvariantString(keyGestureToken) as KeyGesture;
Core\CSharp\System\Windows\Input\Command\KeyGestureConverter.cs (4)
70KeyGesture keyGesture = context.Instance as KeyGesture; 157KeyGesture keyGesture = value as KeyGesture;
Core\CSharp\System\Windows\Input\Command\KeyGestureValueSerializer.cs (4)
54KeyGesture keyGesture = value as KeyGesture; 71TypeConverter converter = TypeDescriptor.GetConverter(typeof(KeyGesture)); 86TypeConverter converter = TypeDescriptor.GetConverter(typeof(KeyGesture));
Core\CSharp\System\Windows\Input\Command\MediaCommands.cs (24)
308KeyGesture.AddGesturesFromResourceStrings( 314KeyGesture.AddGesturesFromResourceStrings( 320KeyGesture.AddGesturesFromResourceStrings( 326KeyGesture.AddGesturesFromResourceStrings( 332KeyGesture.AddGesturesFromResourceStrings( 338KeyGesture.AddGesturesFromResourceStrings( 344KeyGesture.AddGesturesFromResourceStrings( 350KeyGesture.AddGesturesFromResourceStrings( 356KeyGesture.AddGesturesFromResourceStrings( 362KeyGesture.AddGesturesFromResourceStrings( 368KeyGesture.AddGesturesFromResourceStrings( 374KeyGesture.AddGesturesFromResourceStrings( 380KeyGesture.AddGesturesFromResourceStrings( 386KeyGesture.AddGesturesFromResourceStrings( 392KeyGesture.AddGesturesFromResourceStrings( 398KeyGesture.AddGesturesFromResourceStrings( 404KeyGesture.AddGesturesFromResourceStrings( 410KeyGesture.AddGesturesFromResourceStrings( 416KeyGesture.AddGesturesFromResourceStrings( 422KeyGesture.AddGesturesFromResourceStrings( 428KeyGesture.AddGesturesFromResourceStrings( 434KeyGesture.AddGesturesFromResourceStrings( 440KeyGesture.AddGesturesFromResourceStrings( 446KeyGesture.AddGesturesFromResourceStrings(
Core\CSharp\System\Windows\Input\Command\NavigationCommands.cs (16)
244KeyGesture.AddGesturesFromResourceStrings( 250KeyGesture.AddGesturesFromResourceStrings( 256KeyGesture.AddGesturesFromResourceStrings( 262KeyGesture.AddGesturesFromResourceStrings( 268KeyGesture.AddGesturesFromResourceStrings( 274KeyGesture.AddGesturesFromResourceStrings( 280KeyGesture.AddGesturesFromResourceStrings( 286KeyGesture.AddGesturesFromResourceStrings( 292KeyGesture.AddGesturesFromResourceStrings( 298KeyGesture.AddGesturesFromResourceStrings( 304KeyGesture.AddGesturesFromResourceStrings( 310KeyGesture.AddGesturesFromResourceStrings( 316KeyGesture.AddGesturesFromResourceStrings( 322KeyGesture.AddGesturesFromResourceStrings( 328KeyGesture.AddGesturesFromResourceStrings( 334KeyGesture.AddGesturesFromResourceStrings(
PresentationFramework (18)
src\Framework\MS\Internal\Commands\CommandHelpers.cs (2)
89KeyGesture.CreateFromResourceStrings(SR.Get(srid1), SR.Get(srid2))); 96KeyGesture.CreateFromResourceStrings(SR.Get(srid1), SR.Get(srid2)));
src\Framework\System\Windows\Controls\InkCanvas.cs (1)
2608InputGesture pasteInputGesture = KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyShiftInsert), SR.Get(SRID.KeyShiftInsertDisplayString));
src\Framework\System\Windows\Controls\ListBox.cs (1)
80CommandHelpers.RegisterCommandHandler(typeof(ListBox), ListBox.SelectAllCommand, new ExecutedRoutedEventHandler(OnSelectAll), new CanExecuteRoutedEventHandler(OnQueryStatusSelectAll), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.ListBoxSelectAllKey), SR.Get(SRID.ListBoxSelectAllKeyDisplayString)));
src\Framework\System\Windows\Controls\MenuItem.cs (2)
1133KeyGesture keyGesture = ((IList)col)[i] as KeyGesture;
src\Framework\System\windows\Documents\TextEditor.cs (2)
422CommandHelpers.RegisterCommandHandler(controlType, ApplicationCommands.Undo, new ExecutedRoutedEventHandler(OnUndo), new CanExecuteRoutedEventHandler(OnQueryStatusUndo), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyUndo), SR.Get(SRID.KeyUndoDisplayString)), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyAltUndo), SR.Get(SRID.KeyAltUndoDisplayString)));
src\Framework\System\windows\Documents\TextEditorCopyPaste.cs (5)
59CommandHelpers.RegisterCommandHandler(controlType, ApplicationCommands.Copy, new ExecutedRoutedEventHandler(OnCopy), new CanExecuteRoutedEventHandler(OnQueryStatusCopy), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyCopy), SR.Get(SRID.KeyCopyDisplayString)), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyCtrlInsert), SR.Get(SRID.KeyCtrlInsertDisplayString))); 66CommandHelpers.RegisterCommandHandler(controlType, ApplicationCommands.Cut, new ExecutedRoutedEventHandler(OnCut), new CanExecuteRoutedEventHandler(OnQueryStatusCut), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyCut), SR.Get(SRID.KeyCutDisplayString)), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyShiftDelete), SR.Get(SRID.KeyShiftDeleteDisplayString))); 70InputGesture inputGesture = KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyShiftInsert), SR.Get(SRID.KeyShiftInsertDisplayString));
src\Framework\System\windows\Documents\TextEditorTyping.cs (2)
93CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.Backspace , new ExecutedRoutedEventHandler(OnBackspace) , onQueryStatusNYI , KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyBackspace), SR.Get(SRID.KeyBackspaceDisplayString)), KeyGesture.CreateFromResourceStrings(SR.Get(SRID.KeyShiftBackspace), SR.Get(SRID.KeyShiftBackspaceDisplayString)) );
src\Framework\System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
431case 339: t = () => typeof(KeyGesture); break;
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
6001typeof(System.Windows.Input.KeyGesture),
src\Framework\System\Windows\Markup\KnownTypes.cs (1)
5883case KnownElements.KeyGesture: t = typeof(System.Windows.Input.KeyGesture); break;
System.Activities.Presentation (36)
System.Activities.Presentation\System\Activities\Presentation\DefaultCommandExtensionCallback.cs (33)
20Dictionary<ICommand, List<KeyGesture>> defaultGestures = new Dictionary<ICommand, List<KeyGesture>>(); 25new List<KeyGesture> { new ChordKeyGesture(Key.E, Key.P) }); 27new List<KeyGesture> { new ChordKeyGesture(Key.E, Key.E) }); 29new List<KeyGesture> { new ChordKeyGesture(Key.E, Key.X) }); 31new List<KeyGesture> { new ChordKeyGesture(Key.E, Key.C) }); 33new List<KeyGesture> { new ChordKeyGesture(Key.E, Key.Y) }); 35new List<KeyGesture> { new ChordKeyGesture(Key.E, Key.R) }); 37new List<KeyGesture> { 41new List<KeyGesture> { 45new List<KeyGesture> { new ChordKeyGesture(Key.E, Key.A) }); 47new List<KeyGesture> { new ChordKeyGesture(Key.E, Key.V) }); 49new List<KeyGesture> { new ChordKeyGesture(Key.E, Key.I) }); 51new List<KeyGesture> { new ChordKeyGesture(Key.E, Key.O) }); 53new List<KeyGesture> { new ChordKeyGesture(Key.E, Key.N) }); 55new List<KeyGesture> { new KeyGesture(Key.F6, ModifierKeys.Control | ModifierKeys.Alt, "Ctrl + Alt + F6") }); 57new List<KeyGesture> { new KeyGesture(Key.Right, ModifierKeys.Alt, "Alt + Right Arrow") }); 59new List<KeyGesture> { new KeyGesture(Key.J, ModifierKeys.Control, "Ctrl + J") }); 61new List<KeyGesture> { new ChordKeyGesture(Key.K, Key.P) }); 63new List<KeyGesture> { new ChordKeyGesture(Key.K, Key.I) }); 65new List<KeyGesture> { new ChordKeyGesture(Key.E, Key.M) }); 67new List<KeyGesture> { new ChordKeyGesture(Key.E, Key.S) }); 69new List<KeyGesture> { new KeyGesture(Key.X, ModifierKeys.Control) }); 71new List<KeyGesture> { new KeyGesture(Key.C, ModifierKeys.Control) }); 73new List<KeyGesture> { new KeyGesture(Key.V, ModifierKeys.Control) }); 75new List<KeyGesture> { new KeyGesture(Key.A, ModifierKeys.Control) }); 77new List<KeyGesture> { new KeyGesture(Key.Z, ModifierKeys.Control) }); 79new List<KeyGesture> { new KeyGesture(Key.Y, ModifierKeys.Control) }); 81new List<KeyGesture> { new KeyGesture(Key.Decimal, ModifierKeys.Alt) }); 83new List<KeyGesture> { new KeyGesture(Key.OemComma, ModifierKeys.Alt) }); 97List<KeyGesture> gestures = null; 111protected bool ContainsGesture(RoutedCommand cmd, KeyGesture gesture) 113return cmd.InputGestures.OfType<KeyGesture>().Any(p => string.Equals(p.DisplayString, gesture.DisplayString));
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (3)
150foreach (KeyGesture gesture in collection) 168foreach (KeyGesture gesture in cmd.InputGestures) 206foreach (KeyGesture gesture in cmd.InputGestures)