Is there a way to "change case" everywhere with keyboard shortcuts?

Very general question, but proabbly there is a way to make this work in a KDE shortcut. Or a script. or some external program like CopyQ which I used for lots of things, but seemingly can’t make his action work.

bASICALLY tO aVOID tEXT lIKE tHIS :slight_smile:

Cam I use sed to monitor the clipboard and modify it in the clipboard manager? Could be another dirty hack if the rest ain’t possible.

1 Like

You can use online tools like this:

And here is a sed example:

echo 'bASICALLY tO aVOID tEXT lIKE tHIS' | sed -E 's/([[:lower:]])|([[:upper:]])/\U\1\L\2/g'

Thanks. I will try to use this in CopyQ as a custom action, once I figure out how to use the variables there. Will have to ask their dev.

How can I read the contents of the clipboard, execute this comand, and write back to the clipboard? Something like here, although I have no idea what manager KDE uses: linux - Pipe to/from the clipboard in Bash script - Stack Overflow

This way I can just create a keyboard shortcut to run this script.

1 Like

I guess something like xclip would work like they show there … but instead make the xclip copy alias that incorporates the scrubbing from above … and set that as a shortcut for Super+Ctrl+C

Off the top of my head that seems easy enough.

Not really sure how you want the clipboard to know when the text is unintentionally caps-locked and dynamically monitor and fix it for you.
I guess its possible … but seems rather pointless to write a whole chunk of software instead of just fixing it in the few instances it occurs.