There are several hooks in speedbar allowing custom behaviors to be added. Available hooks are:
Hooks run when speedbar visits a file in the selected frame.
Hooks run when speedbar visits a tag in the selected frame.
Hooks run when the keymaps are regenerated. Keymaps are reconfigured whenever modes change. This will let you add custom key bindings.
Hooks called before popping up the speedbar frame. New frames are often popped up when “power clicking” on an item to view it.
Hooks called before deleting or hiding the speedbar frame.
Hooks called after creating a speedbar buffer.
Hooks called after running the speedbar timer function.
Hook called whenever generic scanners are reset. Set this to implement your own scanning or rescan safe functions with state data.