Keylogger Instructions Compile the keylogger.c file using gcc. Press F1 or ESC to close the program. key.txt file will be created in the same folder as of keylogger.exe.