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