What is the tilde(~) key code? (EKEY_CODE)

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
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

What is the tilde(~) key code? (EKEY_CODE)

Post by MasterGod »

EKEY_CODE::KEY_??
Which is the tilde (~) code?

P.S
I've searched the forum but a KEY_XXX was not found.
I'm referring to the key left to the '1' key - above the tab.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

First, that isn't the tilde key. It is the backquote key. You get a tilde if you press that key while holding shift, much like you get an @ when holding shift and pressing 2.

Second, can't you write a ten line event receiver to tell you the answer?

Travis
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

I found that event.KeyInput.Key's value when pressing '`' is 192..

192=0xC0, now because none of the enum values is 0xC0 does that mean that there isn't a EKEY_CODE for it?
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Ivo Georgiev
Posts: 27
Joined: Wed Dec 12, 2007 7:05 pm

Post by Ivo Georgiev »

Here is a problem :D
192 is not the write key code for some keyboards...so I strongly recomend DO NOT use this key...the key code is different in the different BRANDS sometimes.
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

So how can I use the '`' key if it has different ASCII code in different keyboards? (Which sounds weird by itself..)
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

There is a field in the KeyInput member of the SEvent structure that is the ASCII character code.

Travis
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

vitek wrote:There is a field in the KeyInput member of the SEvent structure that is the ASCII character code.

Travis
Thanks! It has all the info I need!! Thanks vitek!

Oh and it's KEY_RETURN :)
EDIT: Or not.. ^^
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Post Reply