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