
Many crucial details live only in public C Header files for obscure Apple frameworks. Support for input methods is baked in to almost all cross-platform UI frameworks, however building an Input Method for macOS is underdocumented to say the least. It allows Apple (as well as a few intrepid 3rd party developers) to provide an inline interface for suggesting characters.

If you've ever typed non-Latin characters on your computer (particularly CJK characters), you've used an input method before. And ultimately led us to look into input methods on macOS. The limitations in the adoption of the accessibility API forced us to be creative. However, certain applications - particularly those not built using native macOS user interface frameworks - did not expose this information to screen readers.

This approach worked for native terminal emulators, like iTerm and Apple Terminal, and xterm.js based emulators like, VSCode & Hyper. On macOS, Fig has always used the accessibility API to determine the position of the caret in supported terminals. In order, to figure out where to position the autocomplete window, we've had to explore many unusual APIs. Modern operating systems do their best to isolate applications from one another. Note that you will be asked to restart your computer for the changes to take effect How it worksĭetermining the location of the cursor in a 3rd party application is a surprisingly tricky problem.


To download Fig on macOS run brew install -cask fig or direct download at fig.io Announcements ← Back to posts Fig now supports JetBrains IDEs Matt Schrage
