PanningTool and keyboard events

Hi,
I’m facing a problem with the keyboard events in the PanningTool.
I’m trying to execute the keyup event. However I don’t see the event if I release the mouse first.
1- Start moving the diagram
2- Hold any key
3- Release the mouse
4- => There is no keyUp event
I guess the PanningTool::doActivate make on hold all the events ?
Any workaround to do achieve this ?
This is an example on CodeSandbox

panningTool

Once the PanningTool is running, it receives all InputEvents. So if you press a key while you are dragging the mouse, it will see the mouse down event. You can confirm this by overriding the PanningTool.doKeyDown method:

    $(go.Diagram, . . .,
      {
        "panningTool.doKeyDown": function() {
          console.log(this.diagram.lastInput.key);
          go.PanningTool.prototype.doKeyDown.call(this);
        },

Once you release the mouse, the mouse up event stops the PanningTool. If you don’t start another tool operation, the Diagram.currentTool will be the Diagram.defaultTool, which is an instance of ToolManager. Then if you release the key that you had been holding down, its doKeyUp method will be called. Try:

    $(go.Diagram, . . .,
      {
        "panningTool.doKeyDown": function() {
          console.log(this.diagram.lastInput.key);
          go.PanningTool.prototype.doKeyDown.call(this);
        },
        "commandHandler.doKeyUp": function() {
          console.log(this.diagram.lastInput.key);
          go.CommandHandler.prototype.doKeyUp.call(this);
        },

This works because the ToolManager normally delegates keyboard events to the CommandHandler.