Keylogging - security

Detecting a keylogger on your system

Can a keylogger be detected by typing some obscure sequence of characters,
using your own keylogger to get that sequence,
and then grepping your entire filesystem's files for that sequence?

Probably would take a long time but this seems like it would be fairly robust.

Unless the keylogger saves your keystrokes as a different encoding,
which would be relatively trivial to do.

So to counteract that, can you grep for multiple different encodings of your sequence?

This would likely produce a lot of garbage results but maybe its worth a try.