How do I specify a public keyboard-character variable in a script?

Hello,

I want to specify a public key press variable to use within my script, something like:

var myKeyChar : char = 'v'; 
function Update () {

     if(Input.GetKeyDown(myKeyChar)
     {
      ...
     }
}

But the public myKeyChar doesn't show up in the editor? I'm new to .js (coming from C++), so maybe I'm approaching this the wrong way.

Thanks

FourSheds

Use String instead of char (GetKeyDown takes a string anyway)

Also - I don't think you can even use character literals in javascript. The usual hack is to use "v"[0]

Alternatively, you could add var keyCode : KeyCode = KeyCode.V;

That should let you pick a key from a dropdown list, and be type safe