A method of producing a device comprising at least one displaceable operating member, wherein a foil is placed into a mould and at least one polymer is injected into the mould to form a housing wall adhering to the foil, which displaceable operating member comprises at least a flexible part of the foil extending over a hole in the housing wall, characterized in that the foil is inserted into the mould, after which said at least one polymer is injected into the mould to form the housing wall with the hole and to form a support element. located in the hole, wherein a gap is provided between the support element and the housing wall, wherein the support element is, at least at an outer area near the gap, adhered to the foil with a reduced adhesion force compared to an adhesion force between the housing wall and the foil, wherein after removing the device from the mould, the support element and the flexible part of the foil are mutually disconnected at a location of said reduced adhesion force.