TIMOB-14069 changes in keybord type checking function

https://jira.appcelerator.org/browse/TIMOB-14069