Audible Typing Simulator?

Is it possible with Keyboard Maestro to type the single letters of a custom text (e.g., the text in the clipboard) with a set delay of n milliseconds for each letter and audible key clicks?

This sort of thing?

Type with Sound Effect.kmmacros (23 KB)

Macro screenshot

Key Sounds.zip (18.7 KB)

Obviously you'd want to pick better sounds, but you get the idea...

1 Like

Thank you - exactly: Where does the audio popup menu pick its sounds?

image

An old-fashioned type-writer sound would be optimal.

I found some nice type-writer sounds here:

Is it possible to make an input dialog appear at the beginning where I can input/paste the text I want to type?

Other... at the bottom.

I have now added an Action at the beginning to prompt for a text:

image

...and then I disabled the following variable assignment. Now it works.

But how can I enter MULTI-LINE text?

I thought I'd come up with a better idea, running a randomised set of keyboard sounds, but for some reason it uses a lot of CPU and the sounds seem to play back slowly. If anyone can come up with a more efficient method, please chip in. @Nige_S? @ccstone?

Type Keys - Type.kmmacros (30 KB)

Macro screenshot

Type Keys - Sound (Submacro).kmmacros (38 KB)

Macro screenshot

Key Sounds.zip (285.9 KB)

Yes, that's a good idea: a randomized set of keyboard sounds would make it more realistic. But how to enter multi-line text at the initial prompt?

Try this version:

Type Keys - Type.kmmacros (30 KB)

Macro screenshot

Hi, thank you for the work! These are the issues:

  1. I've set the sound folder:

However, the sounds are not played.

  1. Multiple lines are typed as one single line.

I had worked out a different mechanic to @noisneil's for typing one letter at a time with Keyboard Maestro but held back posting it to avoid confusion. This method keeps the line breaks when multi-line text is used.

In the example Macro below the multi-line text is already in a Variable. But there are lots of ways you could get the text in, including @noisneil's AppleScript dialog or using the currently greyed out Actions in the Example Macro to copy selected text and set the Variable to that text. Hope that makes sense.

EXAMPLE Typing Simulation and Sound v2.00.kmmacros (6.4 KB)

Click to Show Image of Macro

1 Like

Hi Zabobon, Thank you for your work.

Unfortunately it does not work for me: When I press the trigger hotkey nothing happens.

D'oh! Ok here's my version with line breaks accounted for, just in case anyone fancies improving on the random key sound part of it. Surely there must be a way to play these audio files without the CPU usage getting out of hand...?

Type Keys - Type.kmmacros (34 KB)

Macro screenshot

1 Like

Ah. It works for me. Check that it is in a Group that is enabled and that you are in an App that accepts typing when you run it. And that you have given it a unique hotkey. I had it in a Global Macro Group called "Experiments" possibly it has come in with that Group disabled (greyed out)?

Thanks for the hint. Yes, the Group was disabled, now it works. Multiline works, and the sound plays well. Do you have a solution for multiple randomised sounds?
I now use the clipboard option - it works well.

Ok this does what you want, and was actually my first instinct, but I liked the idea of the random file playback... This one was a bit more faff to set up, and I was seeing if I could avoid all the clicketyclickery!

If your Key Sounds folder moves from the desktop, you'll probably need to go through each Play Sound action and reselect a sound.

Type Keys - Type v2.kmmacros (39 KB)

Macro screenshot

Key Sounds.zip (285.9 KB)

Okay, @noisneil has already solved it. But as I was continuing to work on my version... here it is. You need to point the five "play sound Actions" to wherever you have saved each of the 5 key sounds.

Just as an extra I made the timing between each typed letter a random time which possibly makes it more human in feel. I used RAND(1,10)/20 to go between a range of 0.05 and 0.5 seconds for each pause.

EXAMPLE Typing Simulation and Sound Random Speed and Sound v3.00.kmmacros (10.9 KB)

Click to Show Image of Macro

1 Like

Very nice! Hope you don't mind but I thought I'd co-opt your random idea, just so that @Peter_Panino has a macro with the best of both worlds:

Type With Keyboard Sound.kmmacros (36 KB)

Macro screenshot

Works pretty well I think!

2 Likes