Posted: 2nd Dec 2011 1:48
I am trying to develop a PC, Tier 1 text-based game. Everything was good to the point I needed to get the "-" sign from the user. I already managed to get and handle the numbers, Enter, BackSpace and Escape keys from the PC keyboard as theuser inputs a text string. This was accomplished by using the ASCII code of each character I needed. However, the GetRawKeyPressed(45) = 1 statement doesn't work at all...

Does anyone know how to get this "-" sign?
Posted: 2nd Dec 2011 2:19
I believe "-" is scancode 11, if that helps. I'll do a quick search over the commands to see if there is a scancode() command.
Posted: 2nd Dec 2011 2:40
I think it is 189 for the - key. At least using the getrawkeystate commands. The ascii code is 45, I have just tested it.
Posted: 2nd Dec 2011 17:38
I just want to warn you that characters such as - are placed on different keys on different keyboards, depending on the language. It can be quite annoying when games are hardcoded to use an English keyboard when you don't have one.
Posted: 4th Dec 2011 21:45
Thank you all for your help.

DVader's advice on using 189 was the one I needed to solve my problem... I really appreciate all your help.