Port to newer kernels

using sysfs instead of proc.
add a layer to handle any virtual input device