corphish / TextTools

Text related functions accessible on text selection
Apache License 2.0
67 stars 3 forks source link

[FR] simple undo/redo (Ctrl+z/Ctrl+Shift+z) #9

Open boognish-rising opened 1 month ago

boognish-rising commented 1 month ago

The title says it all.

Android supports undo/redo functionality throughout, but unless one is using an attached physical keyboard or has installed a virtual keyboard with Ctrl, Shift, Alt etc. (like Hacker's Keyboard or Unexpected Keyboard), this functionality may as well not exist as there's simply no way for the user to take advantage of it. It would be a very welcomed addition to Text Tools if it wasn't already in the pipeline.

Similarly, a basic dictionary/define function to supplement the official functionality would be awesome. Since the official offering seems to be very selective as to the apps from which the context menu will offer "Define" as an option when a single word is highlighted.

I know there are a bunch of others that I had made a mental note to relay once I got around to posting but they all evade me at the moment other than "search and replace," but I see that's already in place/underway (I don't have the functionality yet - still need to confirm version, though).

corphish commented 1 month ago

Not sure if text history information is made available to third party apps (like let's say you type something inside whatsapp, TextTools doesn't have any idea of what is being typed inside whatsapp. Once you select the text in WhatsApp and select TextTools, TextTools has idea only about the selected text). So need to check if it is possible for 3rd party apps to access what is being typed in other apps. Another option could be type everything inside TextTools with all the undo/redo (and possibly more) and then publish it to another app. Let's see.

Dictionary, let's see how the official one works. I would imagine that I would be needing a free API to fetch the word meaning from but sounds like a cool idea.

I am aware of the other suggestions posted by you/others and appreciate it. Cheers.

boognish-rising commented 1 month ago

Not sure if text history information is made available to third party apps (like let's say you type something inside whatsapp, TextTools doesn't have any idea of what is being typed inside whatsapp. Once you select the text in WhatsApp and select TextTools, TextTools has idea only about the selected text). So need to check if it is possible for 3rd party apps to access what is being typed in other apps. Another option could be type everything inside TextTools with all the undo/redo (and possibly more) and then publish it to another app. Let's see.

Dictionary, let's see how the official one works. I would imagine that I would be needing a free API to fetch the word meaning from but sounds like a cool idea.

I am aware of the other suggestions posted by you/others and appreciate it. Cheers.

No worries! We just appreciate your work and are excited about it.

As for your comment re: history, I hadn't even considered that (I guess that's why you're the dev and I'm just a user LOL). though, and this is just a thought, I have a keylogger that had no problems capturing all of the text input of all installed/system apps, however it does so via an Accessibility Service if I'm not mistaken, which may be a route you wish to avoid going. Still, absent any other way, it might be a worthwhile option. If the user doesn't want to grant such access, so be it. However, I for one would be more than willing to grant whatever access necessary, as I trust your intentions and would get great use out of the functionality!

Thanks a lot for taking the time to respond! I'm still loving TT and even more so the fact that you stated from the outset that you had a vision of an expanded set of tools/use cases and have embodied that statement ever since.

Cheers!

boognish-rising commented 1 month ago

Regarding the define functionality, I was already going back and forth with Gemini about something so when I read your response, I simply posed the question regarding whether a "define" API was available via developer's console (or otherwise). Here's the response FYI (less the considerations and words of caution, etc. I thought I told Gemini not to bother with that shit lol):

Fetching Word Definitions: API Options

Great idea for a feature! A built-in dictionary function within a context menu tool would undoubtedly be a valuable addition. Unfortunately, Google doesn't provide a direct API for fetching word definitions from its search engine or Google Dictionary. However, several third-party APIs offer this functionality.

Third-Party API Options:

corphish commented 1 month ago

Thanks! I would avoid any APIs provided by Google (or any other provider requiring API key) as I would not want to expose it in public (and possibly something FDroid would also not recommend). But looks like the dictionaryapi.dev seems to fit the use case.

boognish-rising commented 1 month ago

Good thinking. Your "core directives" where these things are concerned is definitely appreciated!

You just illustrated precisely why I wouldn't hesitate for a moment to provide TT with "wide berth" access if ever a reason to do so came about (i.e., Accessibility service for logging key input data, if you were to ever make something of the sort an option)