FEAT: added support for INPUT on MacOSX and FreeBSD
FIX: filter widechar for INPUT on non-Windows platform.