Shortcuts on ctrl+click selected events

Hello,

I’m using shortcuts to delete and copy/paste events in the timeline view of the scheduler (via the key_nav extension).
This is plenty functional when selecting an event with a single click in the scheduler, but nothing happens when the event has been selected using the combination ctrl+click (this shortcut is used for another custom functionality).
For example :

  • Click on an event + press the “del” button => Confirmation dialog
  • Ctrl+click on an event + press the “del” button => Nothing happens
    I noticed that the “ctrl+click” combination doesn’t set the “dhx_cal_event_selected” class on the div.dhx_cal_event_line element of the DOM. Is this the origin of the problem ?

Does anyone know how to make available the shortcuts on the “ctrl+click” selected events ? Or as a “plan B”, how can I programmaticaly select an event ?
Thanks for your help

Hello @Nickeau ,

Regarding this part:

This is plenty functional when selecting an event with a single click in the scheduler, but nothing happens when the event has been selected using the combination ctrl+click (this shortcut is used for another custom functionality).

It’s hard to suggest why it doesn’t work in your case, as it highly likely is connected with custom functionality for the ctrl+click shortcut, could you please reproduce the issue in the following demo:
http://snippet.dhtmlx.com/5/2b1458026
(open the demo => reproduce the issue on HTML/CODE tabs => click the “Share” button)?

Regarding this part:

Or as a “plan B”, how can I programmaticaly select an event ?

You can programmatically select an event with the select method:
https://docs.dhtmlx.com/scheduler/api__scheduler_select.html

For example:

scheduler.addShortcut("shift+t", function(e){ 
    scheduler.select(1); 
},"scheduler");