Dhtmlx.alert or dhtmlx.confirm not show on keydown event

import { alert as AlertDHX, confirm as ConfirmDHX, message as MessageDHX } from "dhx-suite";
......
myform.events.on("keydown", function(ev,name,id){
    // Position 1
    switch(ev.key){
        case "Enter":
          // Position 2
          break;
    }
});

In Position 1, all the AlertDHX, ConfirmDHX, MessageDHX and the native alert(), work;
while in Position 2, only the MessageDHX and the native alert() work.

Could you please, provide a snippet or a complete demo, where the problem could be reconstructed locally.