Receiving event for backslash key

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
harkathmaker
Posts: 39
Joined: Wed Jun 10, 2009 11:28 pm
Location: Portland, Oregon
Contact:

Receiving event for backslash key

Post by harkathmaker »

I looked through the keycodes for the key event, but I don't think backslash ("/") is defined. I also looked up the keycode and tried manually putting that in, but that didn't work.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, that character is called slash, backslash is this one : '\'
But you can always check the actual character in the text field, instead of checking for the predefined keycode.
harkathmaker
Posts: 39
Joined: Wed Jun 10, 2009 11:28 pm
Location: Portland, Oregon
Contact:

Post by harkathmaker »

Well, I'm trying to make the game open the chat interface when "/" is pressed (there are a number of games that do this I think). But I can't think of any way other than waiting for an event with the keycode of slash...?
DtD
Posts: 264
Joined: Mon Aug 11, 2008 7:05 am
Location: Kansas
Contact:

Post by DtD »

We had a use of it too, here are [, \, and ]

Code: Select all

		KEY_OPENBRACKET      = 0xDB,  //[ key
		KEY_BACKSLASH        = 0xDC,  //\ key
		KEY_CLOSEBRACKET     = 0xDD,  //] key
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Like hybrid said, check SKeyInput.Char instead of SKeyInput.Key
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply