imac keyboard input stop only within an app
iMac (27-inch, Late 2013)
High Sierra 10.13.6
Starting a few days ago, I will be typing in some program (Notes; MS Word; Excel; MATLAB; Chrome; etc) and suddenly, mid-word, input stops. I can go to another app and it's working again. Restarting the app fixes the problem; or, with Chrome, I can create a new *window* (not tab) and it will be ok again.
It seems like it's happened for every app I type in (listed above), at least once.
It's continued since a system restart.
Could there be some other program that is interfering? Java crashing or something?
The problem is not the keyboard, I have tried others (bluetooth and USB) and all behave the same way. It is specific to apps. The keyboards work fine.
This imac is old, so old OS can't be updated anymore. But this problem is new.
Any ideas?
thanks
iMac 27″, macOS 10.13