Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

TextEvents Not Working is Visual Studio Package

$
0
0

I have entered the following code into my visual studio package. Followed by setting a break point on the handler. The break point is never hit. My intentions are to read the current line and input and take action if it contains a particular string. 

...{ Events2 = Globals.Dte.Events as Events2; Events2.TextDocumentKeyPressEvents.AfterKeyPress += TextDocumentKeyPressEvents_AfterKeyPress; Events2.TextDocumentKeyPressEvents.BeforeKeyPress += TextDocumentKeyPressEvents_BeforeKeyPress; } void TextDocumentKeyPressEvents_BeforeKeyPress(string Keypress, TextSelection Selection, bool InStatementCompletion, ref bool CancelKeypress) { } void TextDocumentKeyPressEvents_AfterKeyPress(string Keypress, TextSelection Selection, bool InStatementCompletion) { }


Seems like a pretty straight forward code snippet. Any help would be greatly appreciated. 


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>