Apple has been spotted applying for a patent for touchscreen keyboards that allow them to mimic the traditional peripherals. However, it is still in the application process and has yet to be officially patented.
The fruit company describes the use of a combination of haptic motors and electrostatic charges to provide feedback when typing. This will then allow each key on the keyboard to emit its own charge. It is also mentioned that the charge would get stronger towards the edge of the feedback mechanism.
As for the mechanical feeling, the patent explains that your fingers will conduct the charges of each key. This lets the keys attract and repel your fingers as you type. This also brings the sensation of texture and friction, allowing users to touch-type without looking at the display.
That being said, as with any patent, the company filing for one doesn’t necessarily mean that it will make use of the technology in its next product. It is better to wait and see if Apple would actually announce the new feature on any upcoming devices.