Can I determine whether the TV is using HID keyboard or remote control?

Hi, I want to define users with a connected keyboard in my smart tv app, how can I do this?