Raw keyboard input...

Ok.. I know how to grab raw keyboard input stuff under dos.  ie: Scan codes.

but I need to be able to do this under Linux and Win32 as well.  Or at least
I need to have Windows or Linux give me raw keyboard input without
keymapping anything to ascii values which I do not want to deal with.

Can I and how?

Thanks in advance.