latestKey is a "signal". Signal is a funny word; it's more like a crystal ball than a smoke signal. Whenever you look at the crystal ball called "latestKey", it shows you the latest key that was pressed (actually, it shows you its character code, which can then be displayed).
The difficult part of latestKey is the foldp. Now, foldp is a very funny word. It's more like a cat than a piece of paper. Some mean person has hooked up the Keyboard.Raw.charPressed signal to poke the "foldp" cat every time a key is pressed. The cat remembers what happened the last time it got poked. Being a very diligent cat, it always wants to do its job (which, as we mentioned above, is to show you a character code which can then be displayed). It tries to do that by calling Char.fromCode with the current pressed key, but if that fails then it just shows you whatever it remembers from last time it got poked.
Now all this intuition about cats inside of crystal balls is very operational. What's really going on is that all the values of keys that have been pressed, and ever will be pressed, are written out on little bits of paper tied to a long ball of yarn. As time goes on, the ball of yarn is unrolled and the cat chases it, stepping along, folding itself over and over, snatching at the little bits of paper that say what key has been pressed and trying each time to work out how to display that.
Whenever it works that out, it writes out the value on a new bit of paper, and attaches it to another piece of yarn. Cats love yarn! You see now, there is actually no crystal ball, just this second ball of yarn which has all the bits of paper the cat has ever written attached to it, and also all the pieces of paper the cat will ever write. It is this second ball of yarn that we feed into our display, and it unfurls as time goes on.
The two (infinite!) lengths of yarn are the signals we work with: the first is the Keyboard.Raw.charPressed signal (the input to the foldp), and the second is latestKey (the output of the foldp). The mental stretch is the idea that these signals exist as concrete things across time, and that they can affect each other (via 'foldp step').
Another detail of foldp is that it always remembers the previous value it calculated, and passes that to the next calculation (step). However, the first time it gets called (the first time a key is pressed), there is no previous value! so we pass it a default value to use in case it needs to fall back to something. The default value here is an underscore, '_' , which the author of the example obviously chose to depict a cat's grin.