Start a new topic

Check whether CafeTran has focus

I just realised that I could check whether CafeTran has focus via Keyboard Maestro's feature to detect screen elements. If a certain screen element (that is related to CafeTran having focus) isn't visible, Keyboard Maestro should go thru a loop until CafeTran is active.

This whole focus aspect is so different from Windows. Took me some time to get used to it, after migrating from Windows.

Of course the reason is the UNIX background of OS X: apps (at that time not called like that) are simply not allowed to steal/take focus.

If that makes any sense.

Hans CafeTran Wiki: If that makes any sense.

Yes, I don’t think it makes much sense.

As far as I know, CafeTran cannot “have focus” because apps cannot have focus. They can be active/frontmost, though. However, parts of the frontmost window of the active application can have focus. In CT, that could be the target language pane, for example. I don’t understand Keyboard Maestro very well, but I think you referred to that when you mentioned “screen elements.”

I’ve been using Macs since 1987, and “programs” have always been called “applications,” often referred to as “apps” by lazy users. It’s quite possible that Apple only started using the term“app[s]” relatively recently, possibly referring to applications for the iPhone.

I don’t think UNIX has much to do with it. Actually, I don’t think I can mention a single UNIX application, apart from “things” you do yourself using the command line. I suppose you can call “grep” an application, but it’s not what most people have in mind when talking about an application.


Okay. Thanks for responding. I don't know what exactly makes kbm macros behave weird, but fact is, they do: I have to keep kbm open and activate it. Then I click on ct and trigger the macro again. Then it is executed. Probably frontmost app is the correct name instead of focus, which may be relevant to Windows only.

It's getting stranger by the minute. I thought you announced yet another brilliant KBM feature. Turns out it's not, it's the opposite rather.

The few Services I use (I can't remember many shortcuts) work here in CT under Java 1.8 and El Capi, and worked before under 1.6 and Yosemite and earlier. It looks like KBM stopped recognising CT as an (independent) app. What if you tell KBM to activate/launch java -jar rather than just CafeTran in your macro's?

That Will is the only CT and KBM user I'm aware of. Does he face the same problems?


java -jar or java -jar CafeTran.jar? The latter may cause problems for CT nowadays.


If those macros exclusively deal with the clipboard, did you change the settings in CT for the clipboard recently?


Login to post a comment