[docs] pattern match using string keys for events