That topic is part of VSTO add-in. But VSTO add-in has 2 dependencies - .NET framework and VSTO runtime library. I don't want dependencies for this. Is there any better native solution for ms office apps? Even Grammarly app doesn't seem to have any dependencies. So i believe some native solution should be available.
I think it's a complex algorithmic process that needs to listen for specific mouse and keyboard behavior, and needs to be filtered. Your needs don't currently seem to have a dedicated API that does what you want. I think Hooks is a viable solution.