How can prevent default shortcuts "Home & End"?

I found the shortcuts defined in CommandeHandler always invoke some method except “Home & End” which just “set” the position value. How can I prevent default “Home & End” action?
A further question: Why not let the “Home & End” invoke “Diagram.scroll” like “PageUp & PageDown” does? I think they perform similar.

Override CommandHandler.doKeyDown to do nothing when those keys are typed. See

Regarding your second question, in version 1.6:

  • Added “document” as a new kind of unit argument to Diagram.scroll, called by the CommandHandler when handling the Home and End keys.