CTRL-A (select all)


#1

Ok, I've got a second issue I'm trying to suss out:

From the Docs, "Text Blaze key presses can trigger actions within a page, but they cannot trigger standard system commands. For instance ctrl-c will not copy the currently selected text to the clipboard and ctrl-q will not quick[sic] the web browser as both those are system commands." So it wasn't a surprise to discover that CTRL-A didn't work to trigger a "select all".

For context: The snippet I'm currently working on pulls specially-formulated data from one cell in a Google Sheets spreadsheet via the clipboard, splits the data into various fields/variables to allow for optional further manipulation, then "types" it into several fields on another website. In most cases, the fields on the destination website will be blank and there is no problem. However, in some cases, there may already be data in some/all of the destination fields. When this is the case, Text Blaze ends up appending its data rather than overwriting. I could theoretically just send a bunch of {key:backspace} commands, but that's not really a viable option for fields that could be anywhere from one to 750 or so characters. Ideally, I'd like to be able to send a {key:ctrl-a} and have it select all then start "typing" the data, which would cause an overwrite.

Any thoughts on a work-around that I might be able to reasonably implement into my snippet?

(ps. Grammar Nazi side note if anyone reading this happens to be in charge of the Docs: Note the "[sic]" in the quote above. Also, I think there might supposed to be a dash between "currently" and "selected". ie "currently-selected". But not sure on that one! ...Text Blaze is a great product...just trying to help it look more perfessionl. :wink:


#2

Thanks for the typo correction. It is now fixed!

One simple thing you can do to optimize the {key:backspace} approach is to wrap it in a {repeat} command. So for instance you could do something like the following to insert 10 backspaces without typing them out individually.

{repeat: 10}{key: backspace}{endrepeat}

Of course this is still a pretty poor solution if you have many characters. Unfortunately, I don't think there is anything better at the moment.

If this was a common issue people ran into, potentially we could add support for emulating the ctrl-a behavior within Text Blaze.


#3

Yes, ctrl-A is a very useful command for many purposes - would greatly appreciate support for this behavior.


#4

Apologies for the delayed response.

Yeah, unfortunately, a {repeat: x}{key: backspace} sequence would be too unwieldy in my use-case. I'd definitely toss my vote behind the implementation of a CTRL-A behavior within Text Blaze!


#5

@Chad_Neeper @Charles_Heckscher, we're adding Ctrl-A emulation. It's currently available in our early access version of Text Blaze and should move to the main version within a couple of weeks.


#6

@Scott: Awesome! I'm looking forward to implementing it. Thank you!