Potassium and oxygen react to form potassium superoxide, not potassium oxide directly. Potassium oxide is an ionic compound that requires a doubly-ionized oxygen atom, which is not oxygen gas, in order to chemically react with two positively-charged potassium ions.
Potassium oxide can be broken apart with heat to form potassium peroxide and potassium, or reacted with nitrogen gas to form potassium nitrate. In industry, the reverse reactions of the more readily available products are implemented in order to extract potassium oxide, which is not easily found in nature but has useful industrial applications. Potassium oxide reacts with water and forms potassium hydroxide.