Where I work, we women have made it clear that the trash can had better be right by the door or we'll throw. Most restaurants' women's restrooms do that these days as well.
And men are especially nasty in restrooms. Especially on planes. They just don't seem to have any control over where that thang is pointing. When I use a keyboard in the computer lab next to my classroom, I always antibacterialize before and after. Especially since the restroom is just around the corner.
You can also run a keyboard through the dishwasher. Go one better and get a folding keyboard you can use. Unplug the icky one and plug this one in.