inputdevices: update code structure