TextInputCanvas

Open Source

Many of the text-based controls in XUI (e.g. XUICodeEditor and XUITagCanvas) are subclasses of DesktopTextInputCanvas which is provided by the TextInputCanvas plugin.

This plugin was originally created by Xojo Inc during the transition from Carbon to Cocoa to fully support text input in a canvas class but was seemingly abandoned (even though I think it is used in the IDE). The plugin has been revamped and modernised by Björn Eriksson from Einhugur Software and is free to use by anyone.

Why do we use it?

It’s not technically possible to properly handle certain keystrokes on macOS using the standard canvas. Additional functionality (such as holding a key and getting accented characters) is virtually impossible to implement without this plugin.

We bundle the plugin with XUI but you can grab it from its source below.

Installation

Installing the plugin is easy and is done in exactly the same way as any other Xojo IDE plugin. Simply drag the plugin into the IDE’s Plugins folder and restart the IDE. This is a one-time operation. Detailed instructions can be found on the Xojo documentation website.