KM to Narrow Choices

Thanks in advance for the help. I am a relatively long-time KM user, but I am not a developer or computer professional. I am wondering if one of my current workflows would be improved by switching from TextExpander to Keyboard Maestro for a particular task.

I am a physician and slogging my way through the major change to our diagnosis codes. Where I used to have one code for “Pain in foot,” I know have lots of codes that I could use: Pain in right leg, pain in left leg, pain in right foot, pain in left foot, pain in left ankle, etc. Right now I am using a Text Expander trigger that gives me a drop down box to pick which of the pain codes I want.

I was thinking of making a KM shortcut that gives me a conflict palette with all of the pain codes and descriptions, and then using the keyboard to drill down to the correct code, having KM print the description and code. I started working on it, and thought that it didn’t really save me much from using TE, but I was wondering if there is a better way to do this with either of these tools.

Thanks very much for any suggestions, or examples,

Mike

Mike — do you by chance use LaunchBar? I do, and would, in your shoes, look into the LaunchBar Snippets feature. Many programs allow you to insert text by shortcut; the advantages of LaunchBar are, first and most important, its look-ahead search, and second, the ability to add snippets as a batch of text files.

The look-ahead search starts the search immediately (with the first character typed), and narrows it in real time as more characters are added to the search string. The characters do not have to be consecutive in the snippet to match the search string (they just have to be sequential).

What this means is that you don’t have to remember a shortcut to find the diagnostic code you want. Type p and every snippet with “p” in its name will be listed (in your case, the name and the content of the snippet would be identical). Add “f” to the search string, and the results will show only those snippets that contain a “p” followed later in the snippet by an “f”. Type l and the results will narrow to snippets that meet the pattern “{anything}p{anything}f{anything}l”. In that way you would step down through all the snippets to the one you want, “Pain in foot, left”.

At any time you can arrow up/down (or mouse or scroll) through the list of matches. Select the match you want, type return and your snippet is pasted.

I find that in practice this works great. (OmniFocus has the same look-up feature. Other programs, I’m sure, do as well.) LaunchBar, of course, does much much more.

Hey Mike,

Keyboard Maestro does snippets quite well, but it is not as good as a dedicated utility.

Although I own copies of both TypeIt4Me and TextExpander I've used Typinator for 5+ years now. I switched because Typinator had the smartest search function of any of them.

In this image you see my Spotlight group represented by the 'sl' prefix, and then I'm drilling down with 'pr'.

I could further refine the search with <space> and more letters (repeat as necessary).

So for your job I might have a pain category with a prefix of 'p' or 'pain'.

Then 'pain le foo' would most likely get me all the way to the 'pain left foot' code.

Keyboard Maestro is just not going to improve greatly on that kind of search.

I too am a LaunchBar user, but I don't care for the way it searches for this kind of task. LB requires contiguous characters in its search strings, and this limits the intelligence and versatility of the query.

-Chris

Chris — are you sure? LaunchBar has, for the many years I've used it, always searched for non-contiguous matches. This is one of its great strengths. Here it is showing a search of snippets narrowed to those that match the search string "plf":

The second match is because "p ... l ... f" is found in "Pain in L e F t leg".

LaunchBar displays the search in all-caps, but both the input and the search are case-insensitive.

Hey Kirby,

I didn't say LaunchBar wouldn't search for non-contiguous matches. What I said is that the query-string doesn't allow non-contiguous strings.

LaunchBar's strength is its smart-seach engine, but the way it handles user-entry of the search string is a weakness under a variety of circumstance.

'plf' can find many different things in a given index of hundreds of thousands of items unless/until you train LB to know that 'Pain in Left Foot' is the correct answer.

The more flexible method is allowing the user more leeway in the query string.

'pain le fo' has a greater chance of finding the correct item than 'plf' – and it allows you to continue to refine the search. Once you stop typing LaunchBar resets, and the search string cannot be modified.

I've been using LaunchBar since v1 or v2, so I'm not unacquainted with its strengths and weaknesses. I've fussed at Objective Development more than a few times about this and other issues over the years.

Sometimes they listen to me; sometimes they don't.

If LaunchBar allowed the user to bring up a text field on demand and enter a more flexible query it would be stronger for it.

-Chris

No, you did not. I'm sorry I mis-read your words. Thanks for the explication.

In use, the Snippets category is a small subset of the items in LaunchBar's index. It is easy to start one's search in the Snippets category, which already effectively minimizes the issue of too many hits. If one had several hundred Snippets, and wanted to corral a subset of them for a particular use (such as the OP likely does), one could add a prefix to the file name of each of them, and type a code for the prefix that nearly limits the search to the terms in the group. (LB Snippets are indexed by the name of the file, and paste the contents of the file.)

Example: "dc" for "diagnostic code"; the user action would bring up LB Snippets (by key-chord set in preferences, or by the usual LB search (e.g.: "Snip") followed by space), and type dcplf. This forces LB to search only (or mostly, approaching only) Snippets that are prefixed with "Diagnostic Code".

––––––––––––––––––––––––––––––––––––––––

I'm still not understanding the workflow you want, and I would like to.

One can bring up a text field — the LB "built-in action" "Enter Text". There are two easy ways to use the text as a LB search string:

  • type return then press and hold while typing cv
  • press and hold while typing acspacev .

If the "Enter Text" Action is used, it can be found in the Most Recent Items collection (b with LB showing). It remembers the last entered string. Selecting it and typing space puts it back in LB's text editor. Additionally, if one uses the return, c, v sequence, the text is saved as a separate entry in the Most Recent Items collection.

I'm not arguing the LB is better than Typinator for this (I don't have Typinator), nor that the fretwork I listed is even useful, but I do think LB provides a fluid and robust interface for storing and inserting snippets.

A dynamic search that allowed user-modification of the search string would be very useful.

Hey Kirby,

It's not terrible, but it would be utterly impossible for me to manage my many thousands of snippets with LaunchBar the way it is now.

If Objective-Dev would allow some simple query language and wildcards it probably would be possible.

They put in the Search in Spotlight function for a similar reason to what I'm fussing about. People didn't like that Spotlight began searching as you type, and this function allowed them to finish typing their query before activating the search.

Under normal circumstances I get what I need quickly with the smart-search as it is, but there are times when I curse it – because it won't find something I know is there – and I can't refine the search.

-Chris

Thank you all very much for the information, and suggestions, and to those that contacted me by private message. I sincerely appreciate the time and energy you put into my question.

For now, I am going to stick with KM and the conflict pallet. All of my “pain” codes have the same trigger, and the conflict palette lets me pick the one I want. I’ve used that same technique when I make a new progress note, all the various notes start with the same trigger, and the palette lets met drill down to the one I want.

Thank you all very much,

Mike