One of the easiest ways to do this is to use [BetterTouchTool][1]. It will let you bind a keyboard shortcut or a trackpad shortcut to many commands, including maximize window. [1]: http://blog.boastr.net/