ARduino as "cell phone - like" USB keayboard

Hi, I have matrix keyboard like this.

I need to connect matrix keayboard to Arduino and write like on phone. If I press 2 get A, if press 222 get C, 9999 get Z…

Arduino will be probably Uno (can USB HID).

Arduino must be as standard usb keyboard for pc.

So if I press “22” on matrix keyboard on pc I want “B”.

Can I use KeyboardPress?

Is is possible to do that keyboard? Is there any existing project with the same functions?

Thank you.

martin159: Arduino will be probably Uno (can USB HID).

The UNO can't easily emulate a USB HID device. The Leonardo can.

I think there are three parts to the problem.

You need to be able to detect and recognise key presses. You should find examples and tutorials showing how to do that.

You want to be able to map key presses onto generated characters. I would do that using a little state machine which keeps track of the state of the multiple key press sequences including timeouts etc. If you're familiar with state machines this will be fairly straightforward - otherwise, you have some learning to do. I don't know whether you are going to provide any user feedback about what character they are generating - I can imagine this being quite fiddly to use without that feedback.

You need to generate the synthetic keyboard input event corresponding to each entered character. It's possible to do this with a UNO and you will find tutorials showing how to do it, but you will find it easier on aq Leonardo since this supports it as a standard feature.