separate keyboard settings code