Command key combinations getting swallowed on Mac

Hi

We are currently intercepting CTRL X etc on key down for some extra processing we need to do (there may be better ways of doing this since GoJS already handles these shortcuts but we want to also handle them outside the diagram so this is the easiest way to handle them consistently). This works great on Windows and also works on the Mac but our Mac users would prefer to use Command X etc. We hook into the keydown event and the Command button being pressed triggers the event but not Command X. Other combinations such as Command K trigger the event. Is this a bug?

By default CommandHandler.doKeyDown handles all keyboard command processing, including Control-X on most platforms and Meta-X on Mac. You can override this method to see if it is intercepting your keydown event handler.

CommandHandler.doKeyDown does not bubble up the event when it thinks it has handled the command, such as in your case the CommandHandler.cutSelection command.

Thanks, you are absolutely right. I’d completely forgotten that I’d overridden doKeyDown for our CTRL key handling, now I just need to do the same thing for the Command key on the Mac. Sorry for wasting your time!