I don't know about the system keys...

The WM_KEYDOWN message has a flag if it was previously pressed (check MSDN). You can test this flag.