Advice for keyboard keypress project

Hi experts!

I need some general advice for a project I would like to commence.

I would like to create a small device that can be "attached/placed" on top of a mechanical keyboard key, with the sole purpose of this device being to press the key it is attached to. I will then code how often to push the button, frequency etc.

I figure I need some kind of motor, but I am not aware of the most suitable type of motor for this application.

Any advice provided would be greatly appreciated!

try a web search arduino solenoid may give you some ideas

The immediate question here is - why?

To what is this keyboard attached? Is is a PC keyboard? Connected by USB?

horace:
try a web search "arduino solenoid"may give you some ideas

Wrong ones.

If we were going to answer the question as posed, the answer would be a servo. :roll_eyes:

But it is most likely the proposal is in itself wrong, ergo the "XY Problem". :slightly_smiling_face:

Thanks for advice so far.

I thought I articulated my question sufficiently to not require additional info on background / purpose, but happy to provide- I want to essentially emulate keystrokes as if made by a user with no ability to distinguish the difference. This means no additional usb connections to PC, not virtualized keyboards, no AHK scripting etc. The device has to push the button - this is the primary constraint to the project.

I have looked through various types of servos, steppers and linear actuators, but I cant seem to find one that would do the trick (ie. Sufficient "push distance, quite quick, small form factor, able to be mounted easily on a 3D printed design etc.).

Hence me asking for advice....

This little solenoid should do the trick for you.

Or this one

Both available from Digikey

Otherwise, google "open frame solenoid" to see a number of other selections.