BlackBerry has been doing this with the keyboards on their phones for some time now
I have the KeyOne and while I love the feature and it works somewhere between OK and excellent, I have trouble correctly using the typing-oriented gestures (auto complete, delete word). I end up avoiding them because I just can't make them work with near 100% accuracy (accuracy being one of the main points of a physical keyboard to me).