[TIMOB-14069] changes in keyboard type checking function

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