Is there a way to create a keyboard shortcut or mouse shortcut without another program or macro program installed to perform the /clear command?

Also, how would can I perform this command upon joining a channel?

Any help is greatly appreciated.