microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
109.19k stars 6.44k forks source link

Text Replacement #5074

Open joshthehappy opened 4 years ago

joshthehappy commented 4 years ago

A simple text replacement tool, my examples are from macOS and iOS, it is also a feature in Android.

Basically this feature: Text Replacements

On your Mac, choose Apple menu > System Preferences, click Keyboard, then click Text.

Another example: Third one down "Set up text replacement"

It's very handy if you have things you need to type regularly, and just typing one word and having my system fill in a whole sentence saves a lot of time and effort at work instead of keeping a copy past text file. I have many web addresses I send to customers and many full sentences for my notes at work that used repeatedly and this kind of feature is surprisingly missing from Windows.

Sorry to open a new issue for this, but my last one was closed already.

mac-autoreplace-fun ios12-iphone-x-settings-keyboards-text-replacement-social-card

niels9001 commented 4 years ago

This would be super neat feature to have. Especially for the many abbreviations we use within our company :-)!

saahmedm commented 4 years ago

hi, this is a good idea @joshthehappy, not sure it fits into the current Keyboard Manager scope so tagged as new PowerToy but also as an enhancement because I could see it expanding KBM's capabilities

joshthehappy commented 4 years ago

hi, this is a good idea @joshthehappy, not sure it fits into the current Keyboard Manager scope so tagged as new PowerToy but also as an enhancement because I could see it expanding KBM's capabilities

Thank you very much for considering this option I have wanted this for a long time, and know it will be used daily by many people if implemented.

Jay-o-Way commented 4 years ago

This is like the auto-replace function in Office programs. Maybe we (or at least developers) can take a look at that functionality to get a head start. Maybe @crutkas has connections with the Office team?

crutkas commented 3 years ago

@jay-o-way office controls the input stack for their app where we would have to be e2e for all apps and be able to delete text and replace it.

this could be really hard to accomplish since someone could tab off and back on and i don't know if PowerToys could get the existing text. Example i type /sh, tab to diff app, then type, then tab back and type ug.

laicasaane commented 3 years ago

We should be able to build several replacement sets and easily switch between them (like changing keyboard layout by Win+Space). As I usually work on multiple contexts which require different sets of keywords.

And it would be more powerful if combined with auto-completion feature proposed here https://github.com/microsoft/PowerToys/issues/6610

enricogior commented 3 years ago

Removed the KBM label since this has nothing to do with the KBM remapping of keys and shortcuts.

e-xf commented 2 years ago

Are there any plans for this feature in future releases? I think it would be a great addition to PowerToys

Jay-o-Way commented 2 years ago

AutoHotkey could do this without breaking a sweat!

niittymaa commented 2 years ago

AutoHotkey could do this without breaking a sweat!

Sure, but it would be great to decrease the number of running apps. I think this kind of feature makes sense to be available with PowerToys.

Jay-o-Way commented 2 years ago

AutoHotkey could do this without breaking a sweat!

Sure, but it would be great to decrease the number of running apps. I think this kind of feature makes sense to be available with PowerToys.

Disagree. Simply said, PowerToys is a bundle of modules. Even if this would be a module, it runs in the background exactly like AutoHotkey does. Ahk is made for situations like this and investing a huge amount of time and effort into making a copy is ... illogical, to put it mildly.

dinodinu commented 1 year ago

AutoHotkey could do this without breaking a sweat!

Sure, but it would be great to decrease the number of running apps. I think this kind of feature makes sense to be available with PowerToys.

Disagree. Simply said, PowerToys is a bundle of modules. Even if this would be a module, it runs in the background exactly like AutoHotkey does. Ahk is made for situations like this and investing a huge amount of time and effort into making a copy is ... illogical, to put it mildly.

But, at the same time PowerToys support the same function provided by AHK already (read the KeyMapper). I guess the idea is to have similar functionality in a simpler form inside powerToys, as it is from Microsoft itself and need not depend on any 3rd party apps. As such, simple features like this shall be available in base OS itself (refer Android/iOS and Mac etc.,) IMHO

adrien-robert commented 1 year ago

I would agree that such a feature inside PowerToys would be lovely. At least a smaller version of what Alfred snippets and text expansion offers (on Mac).

image

75338 commented 1 year ago

Can someone link me to the AutoHotKey script to do this, or similar? I've been looking for this for some time unsuccessfully.

EDIT: Holy crap I did it. Turns out the AutoHotKey help file has a very similar thing it's just difficult to find from a Google search.

  1. Open the AHK help.
  2. Click Tutorial (yeah, it's a massive wall of text)
  3. Scroll to section 2: Hotstrings
  4. "::ftw::Free the whales" is the key part - once you have this script running in the background anytime you type "ftw" it'll autocorrect to "Free the whales". Not sure if you need a "return" in the next line.
  5. All I bloody wanted was a simple way to input my email address... just took me hours of searching to find that one simple AHK phrase.
411A commented 1 year ago

I really need this feature on PowerToys, Tho there are many TextExpander apps. I already have Beeftext on Windows & espanso on Linux. But I would like to see it on PowerToys with its beautiful UI. I think this should be the main focus of the developers cause it's vital & can be useful for all people, including developers to manage their snippets & long shell scripts.

niittymaa commented 1 year ago

I really need this feature on PowerToys, Tho there are many TextExpander apps. I already have Beeftext on Windows & espanso on Linux. But I would like to see it on PowerToys with its beautiful UI. I think this should be the main focus of the developers cause it's vital & can be useful for all people, including developers to manage their snippets & long shell scripts.

Same here. I've been using Beeftext lately. It's great, but I think this basic text expander to PowerToys, could reduce installed apps for me. Even just a simple version of text expanding feature would be great to have.

diegocjorge commented 1 year ago

I would also love this feature. Especially if it would synchronize across computers using OneDrive.

TemporaryDylan34Cats commented 1 year ago

I know that it has been three years, but I still think that this should be added. Here's some examples of how it could be used.

Text Replacement
IDK I don't know
aslo also
myemail email@example.com
2/3

I could also use this to complete commands in Minecraft

thewhitewayofdelight commented 1 year ago

+1 for this feature

HsbHrc commented 1 year ago

+1

HsbHrc commented 1 year ago

To add to the conversation on why the text-replacement feature should be added to PowerToys in spite of alternative apps being available:

Our IT team has to approve each installation/update. They trust PowerToys as it is published by Microsoft, so it is easy to get approval for it.

Getting approvals for other apps would not only be time-consuming and disruptive to work, requests for approval may be rejected outright if the IT team is not comfortable with the source of the app.

Obviously, I am not IT, just a slightly tech-savvy desk jockey.

Pawel-Dymek commented 1 year ago

Yes, this, please. We need this feature

audwinoyong commented 1 year ago

+1 for this feature 👍

maisondasilva commented 1 year ago

+1

bigplayer-ai commented 1 year ago

Is there other application that does this?

B-E-Z commented 1 year ago

Per @HsbHrc - I would advocate for this as well, as PowerToys is a trusted suite, backed by IT (My team). They've seen helpdesk requests for utilities that accomplish this, and while we want to accommodate the need, (I personally would use this) we prefer not to sanction the solutions/utilities suggested for it.

To add to the conversation on why the text-replacement feature should be added to PowerToys in spite of alternative apps being available:

Our IT team has to approve each installation/update. They trust PowerToys as it is published by Microsoft, so it is easy to get approval for it.

Getting approvals for other apps would not only be time-consuming and disruptive to work, requests for approval may be rejected outright if the IT team is not comfortable with the source of the app.

Obviously, I am not IT, just a slightly tech-savvy desk jockey.

mlazzarotto commented 1 year ago

Is there other application that does this?

AutoHotKey

schancksb commented 1 year ago

+1

joswald94123 commented 1 year ago

+1 This is SUCH an obvious feature to add because of its extreme utility. It would be one of the most important productivity tools that Windows has ever gotten.

schobernoise commented 1 year ago

+1

ChauThan commented 1 year ago

+1

christophsanz commented 12 months ago

It would be awesome to add this to (or as a replacement) of the native "Windows + V" Clipboard History thingy. So not just shortcuts, but a whole menu where you see a clipboard history and all of your saved snippets.

realgooseman commented 11 months ago

Any updates on this ?

For now, Beeftext or Espanso work great as text expanders on Windows. However, integrating it to PowerToys would make it an even more feature-rich toolbox.

mlazzarotto commented 11 months ago

Please, stop posting "+1". If you all want to show your support to this feature request, you can add a reaction on the first post.

Rikagio commented 7 months ago

Yes I already placed my thumbs up - Im new to GitHub and don't totally get all posts, so, just checking: this is not yet implemented or in plans of, right?

illgitthat commented 6 months ago

The latest version of powertoys (0.79.0) makes this feature much closer to reality. @enricogior do you still see this as a separate feature or could this be an enhancement to Keyboard Shortcut Manager

Edit: Example for text replacement from a "chord". If the chord was expanded to allow flexible text input this could accomplish many other use cases.

image

DavidMichaelangelo commented 6 months ago

Chiming in here :) I see it as a separate feature. True text replacement should work like it does on iPhone -- where once a specific keyword is typed it is immediately replaced with the replacement phrase -- no keyboard shortcut required.

illgitthat commented 6 months ago

Chiming in here :) I see it as a separate feature. True text replacement should work like it does on iPhone -- where once a specific keyword is typed it is immediately replaced with the replacement phrase -- no keyboard shortcut required.

I should rephrase. I agree that the feature request doesn't really fit directly with "Keyboard Manager" because it could be confusing to add it in there. What I meant was that it looks like the existing shortcut remap feature is a close solution from a technical perspective to what is being requested here.

DavidMichaelangelo commented 6 months ago

@illgitthat I get what you're saying now. Fingers crossed they see it that way too and develop it!

cavanaug commented 4 months ago

FWIW, I think the desire for this functionality is becoming more and more obvious given all the duplicate issues being opened requesting it. :-)

TunaErtemalp commented 4 months ago

From my dup'd #32541: "...The best I found was BeefText and it works great. It has some very complex features, too. But it is now in maintenance mode. Maybe you can approach the author to see what he thinks about getting included in PowerToys." Now that he decided to not do further active development on it, he might be happy to hand it over to a team to get used by a greater audience...

Nevy216 commented 4 months ago

Thanks @Tuna. Also AutoHotkeys is excellent for the keyboard replacement stuff. I've used AutoHotkeys for 15 years. The problem is that it's not good for corporate machines and wouldn't pass most corporate restriction SW rules. Anyway, check in with the AutoHotkey community and ask them to help out PowerToys. https://www.autohotkey.com/

craiglobo1 commented 3 months ago

+1 hopefully this can come out soon