We will do the slightly science talk then so you can try to make sense of any techniques you might be reading of.
Generally there are two ways to get rid of a smell.
Get rid of the things causing it. In some cases basic chemistry means you leave it for months and months with a lot of ventilation and it will go away. Ozone speeds this process up, quite substantially at that. There are liquids that work on the reverse of the principle of perfume
Mask the smell with something else. Tobacco smoke however is a very potent smell for a lot of people, one that lasts a long time and can cut through a lot of things and causes something of a visceral reaction in some people. This means masking is hard and why I was going for the potent things right off the hop.
Tobacco smoke is something of a gas and will deposit things around the place, under things and can do so in reasonable volumes if given enough exposure which is why it is so annoying to deal with (even more so as it tends to form a sticky goo if there is enough there or joins things that might otherwise be there).
Ozone is a form of oxygen (O3 if you were curious). Most people describe it as a "clean" smell (the people that don't being those that are exposed to a lot of it, or that associate it with something bad). Lightning and certain types of electrical sparks (guess how you would be making it if you made your own --
http://www.bigclive.com/oz.htm ) being where most smell it.
Poisonous in high doses, not that your home efforts should get anywhere near that if you have anything close to ventilation, but reactive as anything, especially with organic materials like the products of cigarette smoke... and most plastics, hence the try to limit exposure thing. Being a gas it also gets everywhere which means you don't have to focus as hard at getting liquids everywhere and under things like liquid cleaning -- car dealers and hotels will have them for sorting things where people smoke in them for precisely this reason (and yes it is a cheap enough device they leave in the place for a couple of hours so the "cleaning fee" is more of a fine than a fee but that is besides the point). Once reacted it is also not conductive so you don't have to dry things out, which can be easier said than done for liquids.
Vinegar, depending upon the type and concentration, could work, however you risk swapping one smell for another plus is a liquid.
Worse than that this thing is reasonably delicate electronics but also fabric and rubberised plastics, and said smoke is primed to penetrate deep into all of that. Were it not then submersion into things is what I would be looking at, theoretically you could find a non conductive liquid of reasonable volatility that also acted as a solvent but price for that sort of thing is going to be way north of a new keyboard.