When performing Autotype, KeePassXC check if the Window Title match (is equal) to the Entry AutoType-Title.
So if a website (or generally a Window Title) change a little its title you won't be able to perform Autotype unless you change the title in the Entry settings.
ex. Set Entry Autotype-Title to GitHub - Mozilla Firefox, then Github change it to GitHub Log In - Mozilla Firefox and you can't perform autotype anymore
Should be nice adding an option to check if the Window Title contains the string.
Maybe a list of comma separated keyword
ex
Set Entry Autotype-Title to GitHub, Mozilla Firefox
If Window Title contains "Github" and "Mozilla Firefox" perform Autotype.
so even if Github change it to GitHub - Log In - Mozilla Firefox, you could perform autotype.
By using only Github you will be able to perform Autotype in all Browsers on the Github login page.
Perhaps wildcards like * or %. Will have to introduce an escape sequence for them though.
Mmmmh seems very nice to me. I will look into this the next week
I've found out that you can actually place regex in the Autotype Title settings inside //
Like //Firefox//
The wildcard is (no/empty title) alternatively//(._)//, the _or* //Firefox|Chrome// and the and is achieved with //(Github).*(Login)//.
@droidmonkey Do you think it's good or we should add a more easy approach?
Anyway I will document it on the wiki like this Wiki:Small-guide-to-Auto-type-custom-sequence
Regex with documentation is good enough imo. It's crazy the features embedded in the code that are not documented.
I've added the following wiki page.
wiki:Autotype-Custom-Sequence
wiki:Autotype-Window-Title
If you can give a look at this for typo or other error. I will close this Issue when you reply :wink:
Looks fantastic, great job documenting. I wonder if there is value in renaming one of the delay keywords to be clear the purpose. Maybe the {DELAY=N} should be renamed and formatted as {TYPEDELAY N}
If I'm not mistaken, the naming is such for backwards compatibility with original "keepass" although I may be mistaken. @jmper stated the following in the parent project PR:
{DELAY X} and {DELAY=X} are different. {DELAY X} only inserts delay before autotyping the entire string. {DELAY=X} (which I added) enables entering delays between every character that is being autotyped. This is useful on sites which do some JS processing of entered characters and KeePassX is too fast for them.
Both DELAY features were meant to be compatible with original KeePass (and KeePassX 0.x), but so far only the first one was implemented.
{DELAY X} only inserts delay before autotyping
I want to point out that you can use {DELAY n} everywhere in the string, like:
{USERNAME}{ENTER}{DELAY 1000}{PASSWORD}
It will work as expected, username -> enter -> delay -> password
Either way its really confusing! Now that I know there is a standard "DELAY" in addition to "DELAY=" there needs to be a correction made since there is no distinction between the two commands besides different syntax!!
Here are the definitions from keepass website:
{DELAY X} Delays X milliseconds.
{DELAY=X} Sets the default delay to X milliseconds for all following keypresses.
These definitions say nothing about a delay prior to typing, which can be easily achieved by adding {DELAY X} before the autotype sequence. @jmper was in error with his statements.
But we can't rename {DELAY=n} to {TYPEDELAY n} because we will broke support with KeePass.
I think we should leave things like this and specify that in the documentation
I personally have no issue with the two different uses of "DELAY" but could offer this:
Perhaps we add a wrapper / alternative mechanism such as the one @droidmonkey suggests but leave the original code as well so that both syntax access the same method?
This way we can document the "main" (new) method and note the lack of backwards compatibility...
On second thought, I don't even like my own suggestion but will leave it here for completeness. We should just find a way to cleanly document the existing (backwards compatible) function and just deal with the apparent syntactic clumsiness of it as backwards compatibility is critical =)
I think it's well specified the diffrence between the two delay in this doc page wiki:Autotype-Custom-Sequence
I'm ok with the current documentation and format of keywords. It's not ideal, but it works.
Most helpful comment
I'm ok with the current documentation and format of keywords. It's not ideal, but it works.