Convert between Spaced String, Camel Case, Kebab Case and Snake Case

This is actually a very easy use case for KM, IF you know a little about RegEx.
KM makes Regular Expressions very easy to use. The challenge, of course, is coming up with the RegEx. But if you can't figure it out, you can always google it. Your use case is very common, and very old. I'm sure many have already developed the RegEx for it.

But it looks like @kcwhat has got you on the right track.

I'd just make two comments:

  1. I would NOT use KM Named Clipboards for this use case. The only time you really need a Named Clipboard is when you need to store rich text, images, or other objects. Named Clipboards are harder to use, and take up a lot more storage space on your Mac.
  2. If you happen to find a JavaScript RegEx solution, it almost always easier to use the KM native RegEx tools

Finally, this might be a good place to start:

Getting Started with Keyboard Maestro

For more help, see Getting Started with Keyboard Maestro and the Forum .