Example stl is for a 23x40.6mm, 45deg stem angle. Use #buttonwidth and #ellipseboost for the top sizing. Changing shell #thickness will change a bunch of other model aspects, so be ready to iterate if you do. If the button is hitting your case surface #ovalheight and #keydepth are set incorrectly. Avoid setting #bosswidth above 5.8mm to avoid interference with the switch body. Change #skirtwidth to match the size of circular hole in your case to keep out dust, the sketch will use a value .1mm less. #switchrib and #switchslot will depend on the tolerances of your printing and slicing profile, I set these oversize and iterate. #stemcrossangle should be self-explanatory.
Takes about 5 minutes to print with .28 layer height, .4 nozzle.
The author marked this model as their own original creation.