Electronic device, controlling method thereof, recording medium and ear jack terminal cap works with the electronic device

The ear jack terminal cap is interlocked with the electronic device, a control method, a recording medium and the electronic device is disclosed. Control method for an electronic device according to an embodiment of the present invention, the ear jack terminal (ear-jack terminal) after the operation of determining whether the insertion of the jack terminal cap, the ear jack terminal cap for having the electronic device If the insertion, the ear jack terminal being at least a type of a button type in the operation of displaying the controllable button type through the cap, the button type, when the ear is received button input for a jack terminal cap of the selected at least one It may include an operation of performing a function corresponding to the button type.