Disable New ie (CTRL + B)

For disabling Save we use cur_frm.disable_save(). I want same to disable the New doc (keyboard shortcut ctrl+ B). Any way to do it via custom script ?

ANy help

Are you trying to disable it only on specific doctypes?

Yes, on custom doctype

Are you trying to disable the creation of a new document or just the shortcut?

Shortcut mainly but interested to know for creation one too

If you want to block its creation you can control this by opening the the doctype editor and if you want role based control (i.e. only certain roles can create, but not others), you can do this very easily by finding the role you wish to limit, and in its row find the check box thats in the column “create”, and uncheck it. If you want to block the doctype from being created at all, you can simply uncheck the box that says “createable” (I think), it should be closer to the bottom of the editor.

As for blocking the shortcut, I personally find that pointless, but it may be possible through overriding it.

Thanks but what i exactly want is on form page, on clicking ctrl+B, let say my doctype name is abc then on pressing ctrl+B it changes from New ABC 1 to New ABC 2 and so on at every press of ctrl +B (New). I want to stop that.