Thermal keylogging attacks utilize residual heat from input devices to extract Personal Identification Numbers (PINs) without the knowledge of the user. This form of attack has become more feasible as affordable thermal imaging equipment has advanced. In this thesis, we conduct a study to systematically assess several factors that influence the success of thermal keylogging attacks, including ambient temperature, humidity, device material, and input speed. We demonstrate an automated method for identifying pressed keys using temperature analysis and offer practical countermeasures based on our findings. In addition, we collected and provided an extensive dataset of over 50,000 thermal images and accompanying key press information, which will be useful for future studies on thermal keylogging attacks. Our findings provide insights into the numerous parameters that influence the success of these attacks, providing essential insights for the development of secure input methods.