Copy and paste keyboard binding and eventBus.on('keyboard.' + event) register


#1

Hello. i’m a korean programmer.

I am doing bpmn-js source analysis these days.
I have seen articles about the copy-paste feature in the blog. (http://bpmn.io/blog/posts/2016-copy-paste-search-bpmn-js-0-15.html)

Copy and paste works well on the demo site.
However, copy-paste does not work in the sample property-panel example at (https://github.com/bpmn-io/bpmn-js-examples).

I found a copy-paste function registered in listeners in the Keyboard.js source of the diagram-js project.

 eventBus.fire('keyboard.' + event,  { node: this._node, listeners: this._listeners })

But I could not find the part to register the keyboard event listener.

eventBus.on('keyboard.' + event, function(e){});

Please confirm that I understand the principle of operation of the keyboard properly.
ctrl+c key event call -> eventBus.fire(‘keyboard.copy’) Keyboard.js -> keyboard.copy listener -> editorActions.trigger(‘copy’) EditorAction.js -> copyPaste.copy(selectedElements)

I will contact you if there is any part that needs to be set in order for the copy-paste function to work. In addition, can I reveal sources that run on the demo site?

I will wait for your reply.
Thank you.