ELECTRONIC DEVICE
An electronic device includes a touch panel, a pressure sensor that detects pressure applied to the touch panel, a vibrator and a processor, wherein, at the time point at which the pressure becomes less than a threshold during a decrease in the pressure, the processor operates the vibrator when the processor determines that a touch is being performed on the touch panel, and the processor does not operate the vibrator when the processor determines that a touch is not being performed on the touch panel.
1 . An electronic device comprising:
a touch panel;
a pressure sensor that detects pressure applied to the touch panel;
a vibrator; and
a processor, wherein
at the time point at which the pressure becomes less than a threshold during a decrease in the pressure, the processor operates the vibrator when the processor determines that a touch is being performed on the touch panel, and the processor does not operate the vibrator when the processor determines that a touch is not being performed on the touch panel.
2 . The electronic device according to claim 1 , wherein, on the basis of the reduction rate per unit time of the pressure, the processor determines whether the touch is being performed on the touch panel.
3 . The electronic device according to claim 1 , wherein
the touch panel includes a touch sensor that detects a touch that is performed on the touch panel, and
the processor determines, on the basis of detection result obtained by the touch sensor, whether the touch is being performed on the touch panel.
4 . A computer-readable recording medium having stored therein a control program used by an electronic device that includes a touch panel, a pressure sensor that detects pressure applied to the touch panel, a vibrator, and a processor, the control program causing the processor to execute a process comprising:
monitoring the pressure; and
at the time point at which the pressure becomes less than a threshold during a decrease in the pressure, operating the vibrator when it is determined that a touch is being performed on the touch panel, and not operating the vibrator when it is determined that a touch is not being performed on the touch panel.