如何处理 VSIX 中的键盘事件?

How to handle Keyboard events in VSIX?

我正在处理 VSIX 项目,我需要检测回车键 OnKeyUp 事件。我如何在 Text Adornment 项目中实现它?当有人在编辑器中按下更改行的键时,我需要检测事件。

我在 this thread of mine. We can use KeyProcessor class for keyboard event handling. We can refer from this sample 中得到了解决方案。