Key Down on a Trigger Enter/Leave Collision

Hello! It’s me again, I’m working on a project which uses Trigger Enter Collision which enables UI prompts, however, I would also like to perform some actions like showing another UI element and playing voice lines when a certain key was pressed, thus, I used Key Up/Down command. If there’s any workaround to make this goal possible I’ll be grateful to learn but I’ll definitely be needing a guide. I would really appreciate any help. Thank you!!

Here’s the UI

and here’s the hierarchy

var LoloTrigger = pc.createScript('loloTrigger');

// initialize code called once per entity
LoloTrigger.prototype.initialize = function() {
    this.entity.collision.on('triggerenter', this.onTriggerEnter, this);
    this.entity.collision.on('triggerleave', this.onTriggerLeave, this);, this.onKeyDown, this);, this.onKeyUp, this);'Reply1').enabled = false;'Reply2').enabled = false;'Reply3').enabled = false;


// update code called every frame
LoloTrigger.prototype.update = function(dt) {


LoloTrigger.prototype.onTriggerEnter = function(result) {
    //'PaperBtn');'Lolo Interactions').enabled = true;

    if ( {'Reply1').enabled = true;'Reply2').enabled = false;'Reply3').enabled = false;

    if ( {'Reply2').enabled = true;'Reply1').enabled = false;'Reply3').enabled = false;

    if ( {'Reply3').enabled = true;'Reply1').enabled = false;'Reply2').enabled = false;


LoloTrigger.prototype.onTriggerLeave= function(result) {
    //'PaperBtn');'Lolo Interactions').enabled = false;