@@ -21,9 +21,9 @@ public class RubberduckHooks : IRubberduckHooks
21
21
// This can't be local - otherwise RawInput can't call it in the subclassing chain.
22
22
// ReSharper disable once PrivateFieldCanBeConvertedToLocalVariable
23
23
private readonly User32 . WndProc _newWndProc ;
24
- private RawInput _rawinput ;
25
- private RawKeyboard _kb ;
26
- private RawMouse _mouse ;
24
+ // private RawInput _rawinput;
25
+ // private RawKeyboard _kb;
26
+ // private RawMouse _mouse;
27
27
private readonly IGeneralConfigService _config ;
28
28
private readonly IEnumerable < CommandBase > _commands ;
29
29
private readonly IList < IAttachable > _hooks = new List < IAttachable > ( ) ;
@@ -56,17 +56,17 @@ public void HookHotkeys()
56
56
var config = _config . LoadConfiguration ( ) ;
57
57
var settings = config . UserSettings . HotkeySettings ;
58
58
59
- _rawinput = new RawInput ( _mainWindowHandle ) ;
59
+ // _rawinput = new RawInput(_mainWindowHandle);
60
60
61
- var kb = ( RawKeyboard ) _rawinput . CreateKeyboard ( ) ;
62
- _rawinput . AddDevice ( kb ) ;
63
- kb . RawKeyInputReceived += Keyboard_RawKeyboardInputReceived ;
64
- _kb = kb ;
61
+ // var kb = (RawKeyboard)_rawinput.CreateKeyboard();
62
+ // _rawinput.AddDevice(kb);
63
+ // kb.RawKeyInputReceived += Keyboard_RawKeyboardInputReceived;
64
+ // _kb = kb;
65
65
66
- var mouse = ( RawMouse ) _rawinput . CreateMouse ( ) ;
67
- _rawinput . AddDevice ( mouse ) ;
68
- mouse . RawMouseInputReceived += Mouse_RawMouseInputReceived ;
69
- _mouse = mouse ;
66
+ // var mouse = (RawMouse)_rawinput.CreateMouse();
67
+ // _rawinput.AddDevice(mouse);
68
+ // mouse.RawMouseInputReceived += Mouse_RawMouseInputReceived;
69
+ // _mouse = mouse;
70
70
71
71
foreach ( var hotkey in settings . Settings . Where ( hotkey => hotkey . IsEnabled ) )
72
72
{
@@ -82,28 +82,28 @@ public void HookHotkeys()
82
82
Attach ( ) ;
83
83
}
84
84
85
- private void Mouse_RawMouseInputReceived ( object sender , RawMouseEventArgs e )
86
- {
87
- if ( e . UlButtons . HasFlag ( UsButtonFlags . RI_MOUSE_LEFT_BUTTON_UP ) || e . UlButtons . HasFlag ( UsButtonFlags . RI_MOUSE_RIGHT_BUTTON_UP ) )
88
- {
89
- OnMessageReceived ( this , HookEventArgs . Empty ) ;
90
- }
91
- }
85
+ // private void Mouse_RawMouseInputReceived(object sender, RawMouseEventArgs e)
86
+ // {
87
+ // if (e.UlButtons.HasFlag(UsButtonFlags.RI_MOUSE_LEFT_BUTTON_UP) || e.UlButtons.HasFlag(UsButtonFlags.RI_MOUSE_RIGHT_BUTTON_UP))
88
+ // {
89
+ // OnMessageReceived(this, HookEventArgs.Empty);
90
+ // }
91
+ // }
92
92
93
- // keys that change the current selection.
94
- private static readonly HashSet < Keys > NavKeys = new HashSet < Keys >
95
- {
96
- Keys . Up , Keys . Down , Keys . Left , Keys . Right , Keys . PageDown , Keys . PageUp , Keys . Enter
97
- } ;
93
+ //// keys that change the current selection.
94
+ // private static readonly HashSet<Keys> NavKeys = new HashSet<Keys>
95
+ // {
96
+ // Keys.Up, Keys.Down, Keys.Left, Keys.Right, Keys.PageDown, Keys.PageUp, Keys.Enter
97
+ // };
98
98
99
- private void Keyboard_RawKeyboardInputReceived ( object sender , RawKeyEventArgs e )
100
- {
101
- // note: handling *all* keys causes annoying RTrim of current line, making editing code a PITA.
102
- if ( e . Message == WM . KEYUP && NavKeys . Contains ( ( Keys ) e . VKey ) )
103
- {
104
- OnMessageReceived ( this , HookEventArgs . Empty ) ;
105
- }
106
- }
99
+ // private void Keyboard_RawKeyboardInputReceived(object sender, RawKeyEventArgs e)
100
+ // {
101
+ // // note: handling *all* keys causes annoying RTrim of current line, making editing code a PITA.
102
+ // if (e.Message == WM.KEYUP && NavKeys.Contains((Keys)e.VKey))
103
+ // {
104
+ // OnMessageReceived(this, HookEventArgs.Empty);
105
+ // }
106
+ // }
107
107
108
108
public IEnumerable < IAttachable > Hooks { get { return _hooks ; } }
109
109
@@ -186,8 +186,8 @@ public void Dispose()
186
186
{
187
187
Detach ( ) ;
188
188
User32 . SetWindowLong ( _mainWindowHandle , ( int ) WindowLongFlags . GWL_WNDPROC , _oldWndProc ) ;
189
- _mouse . RawMouseInputReceived -= Mouse_RawMouseInputReceived ;
190
- _kb . RawKeyInputReceived -= Keyboard_RawKeyboardInputReceived ;
189
+ // _mouse.RawMouseInputReceived -= Mouse_RawMouseInputReceived;
190
+ // _kb.RawKeyInputReceived -= Keyboard_RawKeyboardInputReceived;
191
191
}
192
192
193
193
private IntPtr WindowProc ( IntPtr hWnd , uint uMsg , IntPtr wParam , IntPtr lParam )
0 commit comments