-
Notifications
You must be signed in to change notification settings - Fork 62
Matching mode
Beeftext v1.4 introduces a new option for combos called loose matching, as opposed to the standard strict matching that has been in place since the first version of the application.
First, here is the raw definition of loose matching:
Loose matching allows a combo to be triggered in the middle of a word without having type a combo-breaking key first.
Let's illustrate the explanation with a simple example. You have found a nice Unicode arrow character ➜
that you often use, so you decide to create a handy Beeftext combo:
Now imagine we want to type the following text using your new combo:
First➜Second
In order to work everywhere, Beeftext's knowledge of your interactions with the system is very limited. The application is informed of the keyboard keys you hit, of mouse click events, and it sometimes checks what the currently active application is. Beeftext has absolutely no knowledge of any text cursor position, and never knows which UI element inside an application is active.
With this limited input, Beeftext does its best to determine when you are actually typing the keyword that is going to trigger a combo. The method is the following:
- Beeftext builds a search string. Let's call it searchStr. Every time you type a printable character, it is added at the end of searchStr, and Beeftext checks in the combo list if searchStr matches a combo keyword. If so, the combo is triggered, i.e. the replacement occurs, and searchStr is reset to an empty string.
- If you press
Backspace
, the last character of searchStr is deleted. - If you press
Space
,Return
, or any non-printable character such asEscape
,Delete
and the arrow keys, searchStr is reset. In Beeftext terminology, these keys are called combo-breaking keys, or combo-breakers. Note that modifier keys such asControl
,Windows
,Alt
andShift
are not considered to be combo-breakers. - If you perform a mouse click, searchStr is reset. This prevents the triggering of a combo when you type the first characters of a keyword, click in another window, then type the remaining characters of the keyword.
With strict matching, which is the only available behavior in Beeftext releases prior to 1.4, typing First==>Second
will not trigger the combo, because when Beeftext looks for a matching combo, it checks if searchStr
is identical to the combo keyword. When you type First==>
, it is not equal to ==>
.
To trigger the combo, you have to type a combo-breaking key such as Escape
between the t
and the first =
.
With loose matching, which can be enabled on a per-combo basis starting with Beeftext v1.4, typing First==>Second
will trigger the combo, because in that mode Beeftext considers that searchStr
matches a combo if searchStr
ends with the combo keyword, and First==>
ends with ==>
.
New combos use strict matching by default. It is the recommended matching mode, because it minimizes the possibility of triggering a combo by mistake.
To enable loose matching for a combo, just change the value of the Matching drop-down menu in the New/Edit Combo dialog to Loose
.
You can also use the Combos menu to change the matching mode for all the selected combos in a single operation.