71 references to KeyGesture
Microsoft.VisualStudio.LanguageServices (7)
GenerateType\GenerateTypeDialog.xaml.cs (5)
51new InputGestureCollection(new List<InputGesture> { new KeyGesture(Key.A, ModifierKeys.Alt) })), 58new InputGestureCollection(new List<InputGesture> { new KeyGesture(Key.K, ModifierKeys.Alt) })), 65new InputGestureCollection(new List<InputGesture> { new KeyGesture(Key.P, ModifierKeys.Alt) })), 72new InputGestureCollection(new List<InputGesture> { new KeyGesture(Key.C, ModifierKeys.Alt) })), 79new InputGestureCollection(new List<InputGesture> { new KeyGesture(Key.X, ModifierKeys.Alt) })),
PickMembers\PickMembersDialog.xaml.cs (2)
52new InputGestureCollection(new List<InputGesture> { new KeyGesture(Key.S, ModifierKeys.Alt) })), 59new InputGestureCollection(new List<InputGesture> { new KeyGesture(Key.D, ModifierKeys.Alt) })),
PresentationCore (2)
System\Windows\Input\Command\KeyBinding.cs (1)
55this(command, new KeyGesture(key, modifiers))
System\Windows\Input\Command\KeyGesture.cs (1)
42: this(key, ModifierKeys.None)
PresentationCore.Tests (30)
System\Windows\Input\Command\KeyGestureConverter.Tests.cs (27)
43yield return new object[] { true, true, new KeyGesture(Key.NumLock, ModifierKeys.Control), typeof(string) }; 46yield return new object[] { true, true, new KeyGesture(Key.Insert, ModifierKeys.Control | ModifierKeys.Windows | ModifierKeys.Alt), typeof(string) }; 47yield return new object[] { true, true, new KeyGesture(Key.NumLock, ModifierKeys.Control | ModifierKeys.Windows), typeof(string) }; 62yield return new object?[] { false, true, new KeyGesture(Key.D1, ModifierKeys.Control), null }; 63yield return new object?[] { false, true, new KeyGesture(Key.A, ModifierKeys.Alt), typeof(KeyGesture) }; 64yield return new object?[] { false, true, new KeyGesture(Key.F5, ModifierKeys.Windows), typeof(MouseGesture) }; 65yield return new object?[] { false, true, new KeyGesture(Key.A, ModifierKeys.Alt), typeof(Key) }; 66yield return new object?[] { false, true, new KeyGesture(Key.F5, ModifierKeys.Windows), typeof(ModifierKeys) }; 96yield return new object?[] { new KeyGesture(Key.NumLock, ModifierKeys.Control), null, CultureInfo.InvariantCulture, "Ctrl+NumLock" }; 97yield return new object?[] { new KeyGesture(Key.A, ModifierKeys.Alt), null, CultureInfo.InvariantCulture, "Alt+A" }; 100yield return new object?[] { new KeyGesture(Key.Insert, ModifierKeys.Control | ModifierKeys.Windows | ModifierKeys.Alt), null, new CultureInfo("de-DE"), "Ctrl+Alt+Windows+Insert", }; 101yield return new object?[] { new KeyGesture(Key.Insert, ModifierKeys.Control | ModifierKeys.Windows | ModifierKeys.Alt), null, CultureInfo.InvariantCulture, "Ctrl+Alt+Windows+Insert" }; 102yield return new object?[] { new KeyGesture(Key.NumLock, ModifierKeys.Control | ModifierKeys.Windows), null, CultureInfo.InvariantCulture, "Ctrl+Windows+NumLock" }; 110yield return new object?[] { new KeyGesture(Key.NumLock, ModifierKeys.Control), null, CultureInfo.InvariantCulture, " Ctrl + NumLock " }; 111yield return new object?[] { new KeyGesture(Key.A, ModifierKeys.Alt), null, CultureInfo.InvariantCulture, "Alt+A " }; 114yield return new object?[] { new KeyGesture(Key.Insert, ModifierKeys.Control | ModifierKeys.Windows | ModifierKeys.Alt), null, new CultureInfo("de-DE"), "Ctrl+Alt+Windows+Insert ", }; 140yield return new object?[] { CultureInfo.InvariantCulture, new KeyGesture(Key.V, ModifierKeys.Control) }; 171yield return new object?[] { "Ctrl+NumLock", null, CultureInfo.InvariantCulture, new KeyGesture(Key.NumLock, ModifierKeys.Control) }; 172yield return new object?[] { "Alt+A", null, CultureInfo.InvariantCulture, new KeyGesture(Key.A, ModifierKeys.Alt) }; 175yield return new object?[] { "Ctrl+Alt+Windows+Insert", null, new CultureInfo("de-DE"), new KeyGesture(Key.Insert, ModifierKeys.Control | ModifierKeys.Windows | ModifierKeys.Alt) }; 176yield return new object?[] { "Ctrl+Alt+Windows+Insert", null, CultureInfo.InvariantCulture, new KeyGesture(Key.Insert, ModifierKeys.Control | ModifierKeys.Windows | ModifierKeys.Alt) }; 177yield return new object?[] { "Ctrl+Windows+NumLock", null, CultureInfo.InvariantCulture, new KeyGesture(Key.NumLock, ModifierKeys.Control | ModifierKeys.Windows) }; 190Assert.Throws<ArgumentNullException>(() => converter.ConvertTo(null, CultureInfo.InvariantCulture, new KeyGesture(Key.C, ModifierKeys.Control), null)); 207yield return new object?[] { new KeyGesture(Key.V, ModifierKeys.Control), typeof(MouseGesture) }; 208yield return new object?[] { new KeyGesture(Key.V, ModifierKeys.Control), typeof(KeyGesture) }; 209yield return new object?[] { new KeyGesture(Key.V, ModifierKeys.Control), typeof(Key) }; 210yield return new object?[] { new KeyGesture(Key.V, ModifierKeys.Control), typeof(ModifierKeys) };
System\Windows\Input\Command\MouseGestureConverter.Tests.cs (3)
69yield return new object?[] { false, true, new KeyGesture(Key.None, ModifierKeys.Alt), typeof(string) }; 131yield return new object?[] { CultureInfo.InvariantCulture, new KeyGesture(Key.V, ModifierKeys.Control) }; 199yield return new object?[] { new KeyGesture(Key.V, ModifierKeys.Control), typeof(string) };
PresentationFramework (30)
MS\Internal\Commands\CommandHelpers.cs (1)
73PrivateRegisterCommandHandler(controlType, command, executedRoutedEventHandler, canExecuteRoutedEventHandler, new KeyGesture(key, modifierKeys));
System\Windows\Controls\DocumentViewer.cs (16)
1448new KeyGesture(Key.D2, ModifierKeys.Control)); 1578new KeyGesture(Key.Add, ModifierKeys.Control), 1580new KeyGesture(Key.Add, ModifierKeys.Shift | ModifierKeys.Control), 1582new KeyGesture(Key.OemPlus, ModifierKeys.Control), 1584new KeyGesture(Key.OemPlus, ModifierKeys.Shift | ModifierKeys.Control)); 1594new KeyGesture(Key.Subtract, ModifierKeys.Control), 1596new KeyGesture(Key.Subtract, ModifierKeys.Shift | ModifierKeys.Control), 1598new KeyGesture(Key.OemMinus, ModifierKeys.Control), 1600new KeyGesture(Key.OemMinus, ModifierKeys.Shift | ModifierKeys.Control)); 1607new KeyGesture(Key.PageUp, ModifierKeys.Control)); 1614new KeyGesture(Key.PageDown, ModifierKeys.Control)); 1621new KeyGesture(Key.Home, ModifierKeys.Control)); 1628new KeyGesture(Key.End, ModifierKeys.Control)); 1639new KeyGesture(Key.D1, ModifierKeys.Control)) 1651new KeyGesture(Key.D3, ModifierKeys.Control)) 1663new KeyGesture(Key.D4, ModifierKeys.Control))
System\Windows\Controls\FlowDocumentReader.cs (2)
1352executedHandler, canExecuteHandler, new KeyGesture(Key.OemPlus, ModifierKeys.Control)); 1356executedHandler, canExecuteHandler, new KeyGesture(Key.OemMinus, ModifierKeys.Control));
System\Windows\Controls\FlowDocumentScrollViewer.cs (4)
1350executedHandler, canExecuteHandler, new KeyGesture(Key.Home), new KeyGesture(Key.Home, ModifierKeys.Control)); 1354executedHandler, canExecuteHandler, new KeyGesture(Key.End), new KeyGesture(Key.End, ModifierKeys.Control)); 1358executedHandler, canExecuteHandler, new KeyGesture(Key.OemPlus, ModifierKeys.Control)); 1362executedHandler, canExecuteHandler, new KeyGesture(Key.OemMinus, ModifierKeys.Control));
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1451executedHandler, canExecuteHandler, new KeyGesture(Key.P, ModifierKeys.Control));
System\Windows\Controls\Primitives\ScrollBar.cs (2)
691CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToTopCommand, onScrollCommand, onQueryScrollCommand, new KeyGesture(Key.Home, ModifierKeys.Control)); 692CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToBottomCommand, onScrollCommand, onQueryScrollCommand, new KeyGesture(Key.End, ModifierKeys.Control));
System\Windows\Controls\SinglePageViewer.cs (4)
1264executedHandler, canExecuteHandler, new KeyGesture(Key.OemPlus, ModifierKeys.Control)); 1268executedHandler, canExecuteHandler, new KeyGesture(Key.OemMinus, ModifierKeys.Control)); 1278CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.FirstPage, new KeyGesture(Key.Home, ModifierKeys.Control))); 1280CommandManager.RegisterClassInputBinding(typeof(FlowDocumentPageViewer), new InputBinding(NavigationCommands.LastPage, new KeyGesture(Key.End, ModifierKeys.Control)));
PresentationUI (2)
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (2)
2074input.Add(new KeyGesture(Key.F6, ModifierKeys.Control)); 2083DocumentViewer.ViewThumbnailsCommand.InputGestures.Add(new KeyGesture(Key.D5, ModifierKeys.Control));