[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[orion-dev] Keyboard shortcuts for custom commands in CodeEditWidget
|
Hi,
I’m using the command service (https://wiki.eclipse.org/Orion/Documentation/Developer_Guide/Plugging_into_the_editor#orion.edit.command) to register commands with the shortcuts Ctrl + and Ctrl -. The registration happens after editor creation in the 'then'-callback.
Unfortunately, the command is executed from the second time on only (i.e. first the browser zoom is triggered, then on second press my command is triggered). I tracked this behavior into the createEditor function in editorSetup.js where the setActiveEditorView function is invoked after a mouse click or key up event. This function has to be invoked for the shortcuts to be active. I currently worked around this problem by triggering a mouse click event after editor creation. Is there a proper way of dealing with this situation?
Regards,
Sebastian
P.S.: It doesn’t help to register the command before the codeEdit.create() call.