Copy macros from input.h to avoid hard depends
bcopy is only suit on linux