keyboard stuff

Various keyboard fixes (#23919) master


+118 -126
21 changed files