Revert "Remove keylogging"

This reverts commit 7433011d7ecb6ad08d9f84bb57f4614be983879f.