added in the keybinding code to add keypatterns