Re-sizing a movieclip with keyboard without on(keyPress "x")

How can I re-size a movieclip with a button on the keyboard without using on(keyPress “x”)? The code will be placed inside a function, like this

[AS]function control2(){
on (keyPress “x”) {

happenings

}
}[/AS]