> For the complete documentation index, see [llms.txt](https://romaincousin.gitbook.io/keystone-2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://romaincousin.gitbook.io/keystone-2/kbar-support.md).

# KBar support for Keystone 2

*Kbar* is a widely used extension for After Effects that allows to create customizable toolbars.\
More informations on: <https://aescripts.com/kbar/>

<figure><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FDqe7ntNFN0vPVfHpjLEz%2Fkeystone-2-kbar.png?alt=media&amp;token=7492f110-db14-4f37-91b9-3c2c45484bc9" alt=""><figcaption></figcaption></figure>

## Installing Keystone 2 features with .kbar files (recommended)

The easiest and most recommended way to set up the features of Keystone 2 in KBar is to use the .kbar files. It contains all KBar-compatible Keystone 2 functions and associated icons.

{% stepper %}
{% step %}
**Download** a .kbar file below

{% file src="/files/o8Q0l3q2ePz3klu8ZnQO" %}
Contains all the Keystone 2 functions in the most compact way possible (recommended)
{% endfile %}

{% file src="/files/eyKiVkviDJWJtnrR1MXb" %}
[Individual / window-less features](#invididual-window-less-features) (optional)
{% endfile %}
{% endstep %}

{% step %}
Go in **KBar settings** (right-click inside a KBar, then click **KBar Settings**)
{% endstep %}

{% step %}
Enter the **Settings** tab
{% endstep %}

{% step %}
Import the `Keystone-2.kbar` file using the **Import from .kbar** button
{% endstep %}
{% endstepper %}

{% hint style="warning" %}

### Switching from "jsx" to "Extension" buttons

In the latest releases (**v2.04 +**), Keystone 2 uses KBar 3's **"Extension"** buttons.

This change from the previous **"jsx"** buttons makes installation much easier for users, as it is no longer necessary to enter the path to the Keystone 2 .jsx file, and features run a little faster.

* **"jsx"** type buttons are now deprecated and may no longer work.
* **"Extension"** buttons are only available on **KBar v3**.
* In order for Keystone 2 features to work in KBar, the **Keystone 2 main extension must be open**. However, it can be hidden behind any other After Effects panel or script.
  {% endhint %}

## Install Keystone 2 features manually

1. Go in **KBar settings** (right-click inside a KBar, then click **KBar Settings**)
2. Click **Add Button**
3. Click **Open Extension**
4. On the first line, find and click on **Keystone 2** in the list.
5. Indicate the **CSEvent data** on the second line ([see the tables below](#icons-and-script-functions))
6. Add the corresponding **description** (optional)
7. Add the corresponding **icon** (optional)

<figure><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FQgppyFHYhKeBeVHU5bwo%2Fimage.png?alt=media&amp;token=735d53f0-5554-4b5b-a910-ccb91b2da470" alt=""><figcaption></figcaption></figure>

<table data-full-width="false"><thead><tr><th width="90" align="center">Icons</th><th width="259">CSEvent data</th><th>Description (optional)</th></tr></thead><tbody><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2F23zp0Mc4OQGGpawAXrkc%2FkeyLabels%402x.png?alt=media&amp;token=f4af0d9c-7d77-4a72-8e27-9626d645ad5d" alt="" data-size="line"></td><td><strong><code>keyLabels</code></strong></td><td>Keyframe labels</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FBs1jpfskwGm4KLEsvZAc%2FkeyAlignFirstKeyCTI_blue.png?alt=media&amp;token=169e2728-4135-4d9a-a39d-037bf6838ef2" alt="" data-size="line"></td><td><strong><code>keyAlignCTI</code></strong></td><td>Align keyframes on the CTI</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FLIdQ49VjRAdEEN0UiaVq%2FkeyAlignInPoint_blue.png?alt=media&amp;token=79984947-0742-472c-9061-6bfaf5b8577b" alt="" data-size="line"></td><td><strong><code>keyAlignEndPoints</code></strong></td><td>Align keyframes on the layer in/out point</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FRtk2i7qnUIz0DBuVNPwl%2FkeyStaggerDescending_blue.png?alt=media&amp;token=2b88c615-7c6d-4418-858b-9507e3e7301a" alt="" data-size="line"></td><td><strong><code>keyStagger</code></strong></td><td>Stagger keyframes</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FQB86fFlTiafUXbKHH1xh%2FkeyDistribute_blue.png?alt=media&amp;token=e4a703a0-9ccf-463e-b2e7-d580292361c8" alt="" data-size="line"></td><td><strong><code>keyDistribute</code></strong></td><td>Distribute keyframes evenly</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FgMIvFLuMP7MGQQVMmG9t%2FkeyStretchFirstKey_blue.png?alt=media&amp;token=862050c6-95e4-4146-9e6a-56d69b4a88e4" alt="" data-size="line"></td><td><strong><code>keyStretch</code></strong></td><td>Stretch keyframes</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FFJAEtoTj50Qq0fEuvJfy%2FkeyShift%2B10_blue.png?alt=media&amp;token=e7d02ae8-824c-4b13-a6ca-11ea6c56de1e" alt="" data-size="line"></td><td><strong><code>keyShift</code></strong></td><td>Shift keyframes</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FI0vAbCZ38dKSTuZcimF4%2FkeyDuplicate_blue.png?alt=media&amp;token=85381e03-a4ff-482c-91f7-8dac62aeca3b" alt="" data-size="line"></td><td><strong><code>keyDuplicate</code></strong></td><td>Duplicate on the CTI</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2F6ej8NZj3R4nSAK2ipNYu%2FkeyDuplicateFlip_blue.png?alt=media&amp;token=9dd63323-dc6e-4c31-9288-a6ac1ead71af" alt="" data-size="line"></td><td><strong><code>keyDuplicateFlip</code></strong></td><td>Duplicate and flip on the CTI</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FOMhpKxudLVPoUDUxm45G%2FkeyFlip_blue.png?alt=media&amp;token=65dba52e-0141-4c71-8e8c-8c218148eca8" alt="" data-size="line"></td><td><strong><code>keyFlip</code></strong></td><td>Flip the keyframes</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FZn3J62IqccZE6PfYmXJE%2FkeyCopy_blue.png?alt=media&amp;token=90710dc6-a118-48f1-9627-69e64d18d477" alt="" data-size="line"></td><td><strong><code>keyCopyPaste</code></strong></td><td>Copy / Paste keyframes</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2F7Xxft4XEyPilSni5oNZD%2FkeyAlignNearestFrame_blue.png?alt=media&amp;token=e06f02bb-8e56-4783-a968-197211d87bbf" alt="" data-size="line"></td><td><strong><code>keyAlignNearestFrame</code></strong></td><td>Align on the nearest frame</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2Ff0G9zlvw8dIoETJftRtn%2FkeyConstantSpeed_blue.png?alt=media&amp;token=c43f8f06-02c2-435c-92b8-23decbff6dbe" alt="" data-size="line"></td><td><strong><code>keyConstantSpeed</code></strong></td><td>Set constant Speed</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FoPMQd1TKAbUg8WKDoTS8%2FkeyOverlapCleaning_blue.png?alt=media&amp;token=5001f3ee-5e9f-4f19-a9a7-98e404be6272" alt="" data-size="line"> </td><td><strong><code>keyOverlapCleaning</code></strong></td><td>Delete all keys between selected keys</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FbhznVXjcO051GvZf95hE%2FlayerLabels%402x.png?alt=media&amp;token=3d279c9e-70a4-4a7f-b5a3-f2c74218f763" alt="" data-size="line"></td><td><strong><code>layerLabels</code></strong></td><td>Layer labels</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2F7iBd3yViChSPxUe3x2Cp%2FlayerAlignInPointCTI_green%401.5x.png?alt=media&amp;token=bf7aeba1-fe95-442c-b692-95add2f40f68" alt="" data-size="line"></td><td><strong><code>layerAlign</code></strong></td><td>Align layers</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FrLZm4oV00aY0wWRpw6GG%2FlayerStaggerDescending_green%401.5x.png?alt=media&amp;token=7143fce8-6052-4352-b2cc-136825b42ebb" alt="" data-size="line"></td><td><strong><code>layerStagger</code></strong></td><td>Stagger layers</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FhVrwBps6uQisogsbpP2M%2FlayerStretchInPoint_green.png?alt=media&amp;token=7e08236c-f693-47a9-aaa6-abde11a766bf" alt="" data-size="line"></td><td><strong><code>layerStretch</code></strong></td><td>Stretch layers</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2F3pTixgaZZMqP5B9zFAkQ%2FlayerShift%2B10_green.png?alt=media&amp;token=40c5668e-baee-495e-9137-5e9021b6cb5d" alt="" data-size="line"></td><td><strong><code>layerShift</code></strong></td><td>Shift layers</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FVl45wU0lULPIjLjdyDph%2FlayerTrimKeys_green%401.5x.png?alt=media&amp;token=4f06a09c-8bf6-48a6-bf60-4805c186f121" alt="" data-size="line"></td><td><strong><code>layerTrim</code></strong></td><td>Trim layers</td></tr></tbody></table>

### Invididual / Window-less features

By default, certain features are grouped together in a single KBar button, which displays a window of options when clicked. (e.g. `keyShift`)

<figure><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FlvQsQNGvfBkHdAZTr4n1%2Fimage.png?alt=media&amp;token=b6c62c83-bb7b-45a9-a122-240fd168cb33" alt=""><figcaption></figcaption></figure>

Following on from the previous example of `keyShift`, you may wish to use the single functions allowing you to simply move keyframes by 1 or 10 frames without displaying the options window.

{% hint style="info" %}

* Modes (`property`, `layer` or `global`) are always accessible by using the appropriate [hotkey](/keystone-2/modes-hotkeys.md) directly on the KBar button.
* Options for linking layers and keyframes are not available.
  {% endhint %}

<table data-full-width="false"><thead><tr><th width="87" align="center">Icons</th><th width="295">CSEvent data</th><th>Description (optional)</th></tr></thead><tbody><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FBs1jpfskwGm4KLEsvZAc%2FkeyAlignFirstKeyCTI_blue.png?alt=media&amp;token=169e2728-4135-4d9a-a39d-037bf6838ef2" alt="" data-size="line"></td><td><strong><code>keyAlignFirstKeyCTI</code></strong></td><td>Align on the first keyframe</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FBRUG1LwAsTPnnGokFuRj%2FkeyAlignLastKeyCTI_blue.png?alt=media&amp;token=16601315-d74f-476b-8de2-9935a4a7051c" alt="" data-size="line"></td><td><strong><code>keyAlignLastKeyCTI</code></strong></td><td>Align on the last keyframe</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FLIdQ49VjRAdEEN0UiaVq%2FkeyAlignInPoint_blue.png?alt=media&amp;token=79984947-0742-472c-9061-6bfaf5b8577b" alt="" data-size="line"></td><td><strong><code>keyAlignInPoint</code></strong></td><td>Align on the layer in point</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FTwCbkoTjSW2aqrf0C5tV%2FkeyAlignOutPoint_blue.png?alt=media&amp;token=76dddb0e-fb43-4587-899f-23d8a3eb8901" alt="" data-size="line"></td><td><strong><code>keyAlignOutPoint</code></strong></td><td>Align on the layer out point</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FR7ELoOxyCvuxILvihSx2%2FkeyShift-10_blue.png?alt=media&amp;token=41d643fb-0360-4be2-9d6b-f7a41bae3f7b" alt="" data-size="line"></td><td><strong><code>keyShift10FramesLeft</code></strong></td><td>Shift 10 frames to the left</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2F5uX2QZUcjGQbkjij1nv4%2FkeyShift-1_blue.png?alt=media&amp;token=49b0fd00-ef6f-4d3c-b167-cb6eb31a90fc" alt="" data-size="line"></td><td><strong><code>keyShift1FrameLeft</code></strong></td><td>Shift 1 frame to the left</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FMh42tIgfKX4XXde7rLrV%2FkeyShift%2B1_blue.png?alt=media&amp;token=36f06488-683b-49db-a5fa-331e65c54f37" alt="" data-size="line"></td><td><strong><code>keyShift1FrameRight</code></strong></td><td>Shift 1 frame to the right</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FFJAEtoTj50Qq0fEuvJfy%2FkeyShift%2B10_blue.png?alt=media&amp;token=e7d02ae8-824c-4b13-a6ca-11ea6c56de1e" alt="" data-size="line"></td><td><strong><code>keyShift10FramesRight</code></strong></td><td>Shift 10 frames to the right</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2F7iBd3yViChSPxUe3x2Cp%2FlayerAlignInPointCTI_green%401.5x.png?alt=media&amp;token=bf7aeba1-fe95-442c-b692-95add2f40f68" alt="" data-size="line"></td><td><strong><code>layerAlignInPointCTI</code></strong></td><td>Align layers in point on the CTI</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FnIWz1LfaNC3D639qUVim%2FlayerAlignOutPointCTI_green%401.5x.png?alt=media&amp;token=14f8ef13-b656-4376-9965-952d91c1732a" alt="" data-size="line"></td><td><strong><code>layerAlignOutPointCTI</code></strong></td><td>Align layers out point on the CTI</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FcFZc0AzM5D3stuRy8kBh%2FlayerAlignInPoint_green%401.5x.png?alt=media&amp;token=2ca447c3-2b5c-49a7-bf27-bb852e473a30" alt="" data-size="line"></td><td><strong><code>layerAlignInPoint</code></strong></td><td>Align layers on the earliest in point</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FVy6IrDgsLtm5u92b4d8o%2FlayerAlignOutPoint_green%401.5x.png?alt=media&amp;token=69cc5386-ee69-4e2b-9171-12e81f4ed18e" alt="" data-size="line"></td><td><strong><code>layerAlignOutPoint</code></strong></td><td>Align layers on the latest out point</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2F3QbIcONbDtoOGirJVyp1%2FlayerShift-10_green.png?alt=media&amp;token=26f49766-b03a-4154-97de-334c77149296" alt="" data-size="line"></td><td><strong><code>layerShift10FramesLeft</code></strong></td><td>Shift 10 frames to the left</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2Fe7Owoa4gozMiUG8Pp7Ly%2FlayerShift-1_green.png?alt=media&amp;token=0ce0d236-b93e-45bd-b5ff-416c623ee898" alt="" data-size="line"></td><td><strong><code>layerShift1FrameLeft</code></strong></td><td>Shift 1 frame to the left</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FXOcP2gf2QeVl7HX8cVas%2FlayerShift%2B1_green.png?alt=media&amp;token=9f6d6c4b-7535-4605-af78-3bb4a1fd4e55" alt="" data-size="line"></td><td><strong><code>layerShift1FrameRight</code></strong></td><td>Shift 1 frame to the right</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2F3pTixgaZZMqP5B9zFAkQ%2FlayerShift%2B10_green.png?alt=media&amp;token=40c5668e-baee-495e-9137-5e9021b6cb5d" alt="" data-size="line"></td><td><strong><code>layerShift10FramesRight</code></strong></td><td>Shift 1 frame to the right</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FSL0Qhp5MnubWQpXd018y%2FlayerTrimFirstKey_green%401.5x.png?alt=media&amp;token=f6ce22d1-2424-4a6a-8189-ac85aca43655" alt="" data-size="line"></td><td><strong><code>layerTrimFirstKey</code></strong></td><td>Trim layer on the first keyframe</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2Fyj3jGDjMUM9RHilmehkv%2FlayerTrimLastKey_green%401.5x.png?alt=media&amp;token=b65eae50-cb77-4e46-af2b-747c039f2878" alt="" data-size="line"></td><td><strong><code>layerTrimLastKey</code></strong></td><td>Trim layer on the last keyframe</td></tr><tr><td align="center"><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2FVl45wU0lULPIjLjdyDph%2FlayerTrimKeys_green%401.5x.png?alt=media&amp;token=4f06a09c-8bf6-48a6-bf60-4805c186f121" alt="" data-size="line"></td><td><strong><code>layerTrimAllKeys</code></strong></td><td>Trim layer on the first and last keyframes</td></tr></tbody></table>

## Download *Keystone 2* icons

{% file src="/files/6fMy7TuLBzv7RQktjupB" %}

{% hint style="info" %}
The icons are in svg format, so feel free to modify them if you wish.
{% endhint %}

## Suffixes *(optional)*

It is possible to add a suffix to the end of the script function in order to force *Keystone 2* to group keyframes by layer, by property or all together.

* **`-LAYER`** groups keyframes by layer. Correspond to the **default** behaviour of a simple click.
* **`-PROPERTY`** groups keyframes by property. Correspond to the **`ALT (⌥)`** + **`click`** behaviour.
* **`-GLOBAL`** groups keyframes all together. Correspond to the **`SHIFT`** + **`click`** behaviour.

### Suffix Example

**`keyAlignFirstKeyCTI-PROPERTY`** will force the alignement of all the selected keyframes of each property on the CTI without having to use the combination **`ALT (⌥)`** + **`click`**.

<figure><img src="https://1660550734-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgqK0k2J2JrgjHSb6skNF%2Fuploads%2Fr7m1kb01axznWA5JHhi7%2Fimage.png?alt=media&amp;token=6fc1b1d1-c87c-4241-b27f-69e1689b697e" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

* Suffixes are **optional** and without any suffix the hotkeys **`ALT (⌥)`** and **`SHIFT`** apply like in the main extension.
* Suffixes are not available for all features (e.g. *Constant speed*, *Overlap cleaning*, *Align to nearest frame*...)
  {% endhint %}
