Custom Layouts
In the FUTO Keyboard, you can create custom keyboard layouts if the included ones are insufficient. These are defined in YAML.
Going to Custom Layouts Menu
The Custom Layouts menu is currently only accessible in Developer Settings.
To get started, enable Developer Settings within the FUTO Keyboard. This is done by going to the Help & Feedback menu and tapping the version code a eight times. Once you've done that, you should see Developer Settings in your FUTO Keyboard settings. Note: This is not related to Android's developer settings; the FUTO Keyboard has its own developer settings menu in its own settings.
Once in Developer Settings, you will see an option for Custom layouts, which will take you to the custom layouts menu. In there, you can create custom layouts.
Adding a Custom Layout
Tap Create new layout and you will be taken to the yaml editor. By default, it will be an alphabetical layout. You can tap in the test field below the editor to preview the current layout.
name: Example Alphabet Layout
rows:
- letters: a b c d e f g h i j
- letters: k l m n o p q r s '
- letters: t u v w x y z
You can modify the letters to construct a different layout. For example, this is how QWERTY can be defined:
name: QWERTY
rows:
- letters: q w e r t y u i o p
- letters: a s d f g h j k l
- letters: z x c v b n m
Features
This section will only touch on a few common features. Please see the Layout Specification for a full description of how to define layouts. You can also explore the FUTO Keyboard Layouts for examples of how layouts can be defined.
Custom Long-Press Keys
If you want to add custom letters to long-press keys, you will need to make sure your row is a list instead of a single line, and then you can write the extra keys like so:
name: "QWERTY"
rows:
# list with extra keys
- letters:
- [q, ą] # q is the key, and long-pressing will let you access ą
- [w, č]
- [e, ę, ė] # long-pressing will include ę and ė
# .. and so on
# single line with no extra keys
- letters: a s d f g h j k l
By default, long-press keys are still added automatically (numbers on the top row and symbols). If you don't want this, include this just below your layout name. You can also include it in specific rows or in specific keys (as described later).
attributes: { moreKeyMode: OnlyExplicit }
The term "moreKeys" refers to long-press keys.
Custom Bottom Row
You can customize the bottom row too. If you don't explicitly define it, the default is used.
name: QWERTY
rows:
- letters: q w e r t y u i o p
- letters: a s d f g h j k l
# Note: You need to specify where to put shift and delete when you're customizing bottom row
- letters: $shift z x c v b n m $delete
- bottom:
- $symbols
- "," # Comma and some other symbols need to be quoted since they can conflict with other meanings in yaml
- $action
- $space
- .
- $enter
For example, you can customize the long-press keys of the period key (though this is not the intended long-term solution for that).
- bottom:
- $symbols
- ","
- $action
- $space
# Using long-form definition of a key so that we can specify to disable default moreKeys for this key
- type: base
attributes: { moreKeyMode: OnlyExplicit }
spec: .
moreKeys: [a, b, c]
- $enter
Layout Errors
If you make a mistake in the definition of your layout, you will see the "error" layout with a button to view error details, and a button to switch layouts. You can view the error details to figure out where the problem is. Often it's something simple like a typo, or you need to quote a certain symbol, or incorrect syntax.
Using Custom Layouts
Once you're done editing your custom layout, hit Save and switch to a different app or different text field. You will still be in your normal layout, but if you long press the space bar or language button you will see your custom layout in the language list. Now you can daily-drive your custom layout.
Contributing
If you believe your layout should be included by default (e.g. because it is a common layout for your language), consider contributing it. See the README for more information on how to contribute.