1. An electronic device comprising a keyboard and a processing unit connected to the keyboard over a data transmission connection, the processing unit being configured to determine the appearance of the keyboard, receive information generated by pressing of a keyboard key and identify the key that was pressed on the basis of the information, the processing unit is further configured to collect information on the key presses and carry out an analysis of them, and re-determine the appearance of the keyboard on the basis of the collected information and the analysis carried out so as to make the keyboard more ergonomic for the user, which makes it easier to use the keyboard and/or the pressing of a wrong key less likely.