I realize this is a deprecated repo, but the src code for d3.keybinding is hosted here, instead of as a separate repo anywhere else.
In d3.keybinding, the callback for each listener is called twice. This is happening because capture is being called twice (once from dispatch.on, and one once from bubble, which also is triggered by dispatch.on). Simply removing the capture listeners allows the code to work as expected.
I realize this is a deprecated repo, but the src code for d3.keybinding is hosted here, instead of as a separate repo anywhere else.
In d3.keybinding, the callback for each listener is called twice. This is happening because capture is being called twice (once from dispatch.on, and one once from bubble, which also is triggered by dispatch.on). Simply removing the capture listeners allows the code to work as expected.