Revert "Revert "Merge pull request #13115 from RudyLu/keyboard/Bug928281-keyboard_OOP""

This reverts commit 9bdd41c3dea84905ad93d02dfa36f92757ea1ada.