Before everyone comments "just find a new job lol" I'll say that I did just that over a small immovable issue and I'm still having this problem at my new job, so that's not a solution in my book.

Occasionally I run into something I'd like to change about my workplace, but whoever is in charge refuses to do it. I'd like some advice on how to go about resolving this without making it a "fix this or I leave" situation.

Here are some examples:

1. at job #1, we were given these disgusting used keyboards to use. Imagine one with years of finger oil coating the keys, yellow dry skin between the keycaps, fingernail fragments and crumbs from years ago beneath the keys. I told my boss on my first day as soon as I saw it that I can't work on it and it's a health hazard. He said "well we're not due to get new ones for xxx months, and besides mine isn't like that. You can clean it anyway." I brought in my own keyboard the next day and it kicked off a squabble with the boss that lasted the rest of my tenure at that job - "you shouldn't have done that, I won't know how to use your keyboard if I have to, you're being too dramatic" (etc). I left this job as a result after a few months.
2. I'm now at a different job, for about a year. Since day one my boss has insisted that the software engineers "show enthusiasm" all the time. He gets annoyed when he comes in for an update and we don't greet him with a smile and a joke. At our six month reviews, he made that a point for each of us, while saying that each of us had excellent technical performance. None of us are customer-facing in any way, this is just for him. I've tried to say that it's hard to switch from "in the zone" working to a casual attitude but just like my old boss, he says "well I can do it so you can too".

I believe resolving issues instead of running from them is an important life skill, but I'm having trouble here. What are some good ways to negotiate without making it a "big deal"?