http://cs.elderscrolls.com/index.php/IsKeyPressed2
http://www.cgl.ucsf.edu/home/tef/wintools/keyview.exe
And the function description from within the SKSE inout.psc:
; returns whether a key is pressedbool Function IsKeyPressed(Int dxKeycode) global native; taps the specified keyFunction TapKey(Int dxKeycode) global native; holds down the specified key until releasedFunction HoldKey(Int dxKeycode) global native; releases the specified keyFunction ReleaseKey(Int dxKeycode) global native; returns whether a key is held;bool Function IsKeyHeld(Int dxKeycode) global native; disables the specified key until enabled again;Function DisableKey(Int dxKeycode) global native; enables a disabled key;Function EnableKey(Int dxKeycode) global native; returns whether a key is disabled;bool Function IsKeyEnabled(Int dxKeycode) global native
Notice that IsKeyPressed acts very picky on toggleable functions like unholster/holster the torch or the toggle console function. You better wait for OnKeyDown as Justin mentioned. Also, console functions:
http://www.creationkit.com/Debug_Script
There's support for toggle menu, instant quit game, toggle collision, toggle god mode and toggle AI.