The keys recoil via springs!
Other than the oboe, instruments that have keys include the saxophone, the clarinet, and the flute. All these instruments are designed so that, after a key is pressed by a finger, they naturally return to their original positions. Springs are what are responsible for this. The photograph shows the spring in the bell portion, but, obviously, there are springs all over the instrument. The keys are attached to pipes that pass through holes. The pipes have straight metal cores running through them and are designed so that they rotate along the axes of these cores when the keys are pressed.