BACKGROUND

Field of the Disclosure

The present disclosure relates to an electronic apparatus, a control method thereof, and a storage medium storing a program.

Description of the Related Art

There are techniques that relate to the operability of an electronic apparatus. Examples are described below.

Japanese Patent Application Laid-Open No. 2010-98589 discusses a technique in which a shortcut key is disabled in a case where no key input is detected for a predetermined period of time after the turning on of a mobile device and an image capturing apparatus is detected. In this way, key operations are automatically restricted as the situation demands.

Japanese Patent Application Laid-Open No. 2008-205841 discusses a technique in which only a release operation and an operation on a registered main item and a registered sub-item are allowed in a case where an operation of an image capturing apparatus is locked. In this way, a user-desired function is set operable even in a case where an operation of a camera is locked.

There is an electronic apparatus that includes an operation member for issuing an instruction to change an operation mode to a predetermined operation mode, and the operation member is configured to be operated by a one-touch operation to facilitate the change of the operation mode to the predetermined operation mode with ease. Meanwhile, in order to avoid unintentional change of the operation mode to the predetermined operation mode due to an erroneous operation on the operation member, the user may wish to make a setting to enable and disable an instruction that is issued by operating the operation member. While the setting is made to “disable”, an instruction that is issued by operating the operation member is continually disabled.

In this case, however, if the setting is changed to “disable” while the electronic apparatus is operating in the predetermined operation mode, there arises an inconsistency between the setting being “disable” and the operation mode being the predetermined operation mode, and this can confuse the user.

The technique discussed in Japanese Patent Application Laid-Open No. 2010-98589 is to automatically restrict key operations based on the predetermined time, which is different from a technique in which an instruction that is issued by operating the operation member is disabled as the user wishes.

The technique discussed in Japanese Patent Application Laid-Open No. 2008-205841 is to restrict operations in the case where the operation of the image capturing apparatus is locked, which is different from a technique in which an instruction that is issued by operating the operation member is continually disabled while the setting is “disable”.

Japanese Patent Application Laid-Open Nos. 2010-98589 and 2008-205841 do not discuss clearing an inconsistency that arises when the setting is changed to “disable” while the electronic apparatus is operating in the predetermined operation mode as described above.

SUMMARY

The present disclosure is in view of the above-described point and is directed to a technique for reducing a situation where an operation is performed in an operation mode that is not intended by a user.

According to an aspect of the present invention, an electronic apparatus includes an operation member configured to issue an instruction to change an operation mode, and at least one memory and at least one processor which function as a setting unit configured to set a restriction state where changing the operation mode to a first operation mode by operating the operation member is restricted, and a control unit configured to perform control to change the operation mode to a second operation mode different from the first operation mode in a case where the restriction state is set by the setting unit when the operation mode is set to the first operation mode.

Further features of the present disclosure will become apparent from the following description of exemplary embodiments with reference to the attached drawings.

