About sandboxie

What would happend if you run a software.exe infected with a keylogger inside sandboxie? Does the keylogger works with sanboxie or depends how good is the keylogger?

Good question. It would depend on the sandbox and the keylogger. Anything you want to test should be in a VM and within the VM a sandbox like

Cuckoo by Claudio Guarnieri is an open-source toolkit you can install locally for analyzing malicious files.
Zero Wine by Joxean Koret is a full-featured tool for dynamically analyzing the behavior of Windows malware by running it within the WINE emulator on Linux.
Buster Sandbox Analyzer by Buster is a wrapper around the Sandboxie tool for Windows, which helps you examine the key actions of applications executed by Sandboxie in your lab.
Malheur by Konrad Rieck is a very promising tool for analyzing the volumes of data collected by behavioral sandboxes.
REMnux by yours truly is a lightweight Linux distribution for assisting malware analysts in reverse-engineering malicious software.