I just realized why I handflap.
Handflapping isn't a generic stim, it has a very specific meaning for me.
Handflap means "There is something I want to communicate" (and this is faster than any other way to do so I do so).
This is also why its never happened around people. I've only started handflapping recently, and its always been on my own. I'd noticed I'd always typed something after flapping and just now it was a strong enough connection that I made that connection.
But when I'm around people who what I want to communicate is appropriate to say to - whether they're the person it is supposed to be directed to or not, I'll just say it verbally. Then I don't handflap because it's been communicated in some other manner. So I might be typing along, have something excitingly interesting I want to say, where if I was alone I'd handflap and if I'm with my boyfriend I'll tell him verbally, and then in both cases I'll respond to the person by posting a reply on the forums. If its in chat, I can do an instant reply typing without pushing any buttons, so I'll type immediately if my hands are already on the keyboard (which is probably true).
If I'm walking around thinking, and I think of something interesting, I might handflap if there's nobody to say it to. But if there's someone who I'd trust to say it to, I might comment it to them instead, even if they're not the final person it'd go to.