As with Saurabh - I'm intruguied to understand the use case/business reason for such a request, but anyway:
You could use the the Core Service to set the details for the Keyword if using metadata remember you'll need to populate the Metadata property in your Keyword with the appropriate XML. If this route was taken you'd need to think of how/when the code would be triggered to perform the action (e.g. batch 'maintenance' overnight / custom page with trigger etc.) ... or, probably more appropriately...
You could subscribe to the Keyword Save event and use an Event Handler to do this also; Meaning that code could be automatically executed.
[UPDATE] for some reason I hadn't seen Saurabhs response - I'll leave this just for the consideration of Core Service approach as we don't know the business requirements / environment etc.