How custom action mode is created