Read from dev input

Add support for reading input device 

This is a feature usable in set-top devices

Also fixed some compiler warnings