Skip to main content
Participant
April 10, 2017
Question

Select keyframe at CTI / Playhead.

  • April 10, 2017
  • 6 replies
  • 4445 views

I've been trawling through the internet to get to the bottom of this but cannot find it anywhere, sorry if I just wasn't looking hard enough and there's and easy answer.

Premiere has some great keyboard functionality now but AE not so much. I have found I can change my shortcuts in the text file but I just can't find something that resembles something similar to Premiere's selecting at playhead feature.

Specifically I want to be able to have my playhead over an exact keyframe so I can select it to be able to manipulate it without having to click it with my mouse. That way I can keep my hands on the keyboard without constantly having to go back and forth. The work I'm currently doing means i'll often have to make position changes (simples ones) but many of them and I'm looking to make it as less repetitive as possible and having to go back to the mouse less if I mess up a keyframe. I can add new ones with shortcuts etc but cannot reselect without the mouse.

Any ideas?

    6 replies

    Participant
    October 10, 2025

    Hey! I got ChatGPT to make it. You have to have the layer already selected but it does select the keyframe at the playhead. I used keyboard shortcut option+K. Code here:

     

    {
    app.beginUndoGroup("Select Keyframe at Playhead");

    var comp = app.project.activeItem;

    if (!(comp && comp instanceof CompItem)) {
    alert("Please select a composition.");
    } else {
    var time = comp.time;
    var selectedLayers = comp.selectedLayers;
    var frameDuration = comp.frameDuration;

    if (selectedLayers.length === 0) {
    alert("Please select at least one layer.");
    } else {
    for (var i = 0; i < selectedLayers.length; i++) {
    var layer = selectedLayers[i];
    selectKeyframesAtTime(layer, time, frameDuration);
    }
    }
    }

    app.endUndoGroup();

    function selectKeyframesAtTime(group, time, frameDuration) {
    for (var i = 1; i <= group.numProperties; i++) {
    var prop = group.property(i);

    if (prop instanceof PropertyGroup) {
    selectKeyframesAtTime(prop, time, frameDuration);
    } else if (prop instanceof Property && prop.numKeys > 0) {
    for (var k = 1; k <= prop.numKeys; k++) {
    var keyTime = prop.keyTime(k);
    var isOnCurrentFrame = Math.abs(keyTime - time) < frameDuration / 2;
    prop.setSelectedAtKey(k, isOnCurrentFrame);
    }
    }
    }
    }
    }

    DKins
    Known Participant
    March 6, 2023

    It's been six years since OP and three years since last reply. I now am getting bogged down by this lack of functionality, too. Adobe, any movement on this? Of course I will submit the feature request if it doesn't already exist, and comment if it does.

     

     - DK

    Mo Moolla
    Legend
    April 25, 2020

    Does anyone have a working link to this script?

     

    Mo

    Community Expert
    April 25, 2020

    So if I am reading this question correctly you want to be able to go directly to an existing keyframe for a specific property and then manipulate edit that property. The next visible keyframe has always been 'k' and the previous keyframe has always been 'j' as long as the timeline panel or the comp panel is active (outlined with a blue highlight). You can reveal all keyframes for any layer by selecting it and pressing 'u' once. If you want to see all keyframes on all layers press 'u' once and they all appear.

     

    If you have a bunch of keyframes on one or more layers and want to get right to the Range Selector Start keyframes value of all any selected or all text layers select the timeline search and type rang - which is probably enough to bring up all range selectors, then comma st, and that is probably enough to bring up all of the keyframes in any text layer's Range Selector Start property. The nice thing about the timeline search field is that it will temporarily hide all other layers in the comp if you don't have any layer selected. It makes things a lot easier to find. No need for a script. Any visible keyframe in any property on any layer or all layers can quickly be found. 

     

    Participating Frequently
    April 27, 2020

    Hi Rick: Thanks so much for the note. The issue here isn't moving TO a kf or finding it (though the kb shortcuts you mention are great!)

     

    The issue is that once the CTI is at a kf, you can't select it with the keyboard. You have to grab your mouse, click it, and then you can change values with the keyboard.

     

    In Premiere, when the CTI is adjacent to a clip and you press D you can select that clip and then move/add effect to that clip -- all WITHOUT touching your mouse.

     

    We're looking for a similar functionality in AE. Thanks!

     

    best

    Eli

     

    michaeld15147761
    Inspiring
    April 10, 2017

    That script looks interesting. But what about the already existing J and K shortcuts? They take you to the previous/next visible keyframe (regardless of layer).

    If you have a lot of keyframed properties visible it can be a bit of a pain, but if you just show the one(s) you want to play with, it's a huge time saver and also can eliminate errors where your playhead is not perfectly overtop of your keyframe (something which can happen  when scrubbing with the mouse, not so much with clicking on the prev/next arrows next to the property).

    Horshack
    Legend
    April 10, 2017

    The OP is looking for a method to select the keyframe; J/K only navigate to the keyframe, without selecting it.

    tompdrmsAuthor
    Participant
    April 10, 2017

    Oh awesome find on the script, i'll have to try it out.

    Horshack
    Legend
    April 10, 2017

    Someone wrote a script that I think does exactly what you need:

    Select Next Keyframe (in selected property) script

    Participating Frequently
    April 25, 2020

    This is now three years old but when I click link is dead ;(

    Does this exist elsewhere?!

    Tom's right -- better to keep your hands off the mouse! In Premiere I wiz around without touching mouse

    Participant
    June 28, 2020

    i was stuck at same problem and i think this might be solution

    i am not an expert in scripting so it just worked for me

    var t = app.project.activeItem.selectedLayers[0].selectedProperties[0].keyTime(app.project.activeItem.selectedLayers[0].selectedProperties[0].selectedKeys[0]);
    app.project.activeItem.time = t;

     

    Horshack
    Legend
    April 10, 2017

    Interesting idea. I couldn't find any method to assign an AE keyboard shortcut to select a single keyframe either. However another idea would be to use the Operating System to assign a key to simulate a mouse click - although this would require using the keyboard to also position the mouse. Here's what I found:

    OSX: Mouse click  keyboard shortcut. |Official Apple Support Communities

    Windows: How to Use a Keyboard to Click Instead of a Mouse (with Pictures)

    tompdrmsAuthor
    Participant
    April 10, 2017

    Oh nice. Yeah, you're right though, you'd need to have the mouse already positioned at the keyframe which kinda defeats the purpose of selecting at timeline. I guess I'm halfway there. Thanks.