Sayyiduna Abu Hurairah (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: When a person performs ablution at home and then goes out for prayer, he is considered to be in prayer until he returns to his house. So do not do this, that is, do not interlace the fingers, do not crack the fingers.
Hadith Referenceسنن دارمي / من كتاب الصللاة / 1444
From these hadiths, the virtue of leaving one's house after performing ablution (wudu) is established; it is as if that person is already in prayer. In another hadith, it is mentioned: for such a person, while going to and returning from the mosque, there are good deeds recorded for every single step. Furthermore, these hadiths contain the prohibition of cracking the fingers and interlacing the fingers. In a narration of Ibn Majah, it is stated that the Messenger of Allah (sallallahu alayhi wa sallam) saw a person playing with his fingers in this manner, so he stopped him from doing so.
This is because it is a futile act, which should not be done anywhere after ablution, whether inside or outside the mosque.