A user input interface for an electronic device, comprising a keyboard with a plurality of keys arranged in proximity to each other. Warehoused medicines are arranged at proper positions on a storage shelf, and released medicines are discharged from the storage shelf. A light sensor arrangement is optically connected to the panel to measure transmitted light energy on detection lines across the touch surface.