I'm doing some research on AppleScript, and I came up with this thread on this website which discusses a very similar problem. It's more difficult than I thought, but it may still be doable.
Here's a test macro that's only partway to the solution but it gives you an idea of how the solution might work:
All it does is beep, but you will notice that it beeps a different sound depending on whether text is selected (this works for some apps, like Safari, but not some other apps. You didn't really say whether there are some apps that would satisfy you. Obviously no solution can work with all apps because some apps grab the keyboard in different ways. Even in Safari this macro only works some of the time, because if someone types too fast, they can beat the dynamically-created menu.)
EDIT: I got it working, but you may not like the approach I used, which requires a lot of macros, so I'm working on a simpler solution.
EDIT: I found more than one solution, but some of my solutions are not very reliable, and some of them are slow (and most of them caused the text to be de-selected.) I'm not happy with that and I don't think you would be either. I'm still trying to find a fast, reliable solution with very little code.