user defined keys

BlitzMax Forums/BlitzMax Beginners Area/user defined keys

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm adding to my game the ability for users to define their own keys, but have hit a bit of a brick wall. I can't work out how to do it at all. This is what i've done so far in a little test program.

(code)
Graphics 640,480,0,60
Local upkey%

While Not KeyHit(key_escape)

upkey=GetChar()

If KeyDown(upkey) Then DrawText "up",10,10

Flip
Cls
Wend
(/code)

The above doesn't work, and im a bit stumped as to what to try next

any suggestions/code examples?

cheers
Charlie