It's not about touching the keyboard. Building a program in your mind is like building a machine. A program is a machine and therefore you use the same area of your brain that e.g. you use while building a Lego object.
Mind maps help. White boards are even better. In my early college years, I used my bedroom's closet mirror like a starving artist would.