Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline fool  
#1 Posted : Monday, May 7, 2012 10:59:39 AM(UTC)
fool

Joined: 8/24/2011(UTC)
Posts: 34
Location: New Zealand

Thanks: 4 times
InputButton.OemBackslash is the odd one out. All the other OEM keys have been named without the Oem prefix, so for the sake of consistency I strongly suggest this key is renamed to InputButton.Backslash.

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline Benjamin  
#2 Posted : Monday, May 7, 2012 11:54:39 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Good catch. Changed now.

I also saw that the Divide key (for the normal slash) was not used. Only the NumPad Divide key was setup, but there was no code to check for the normal Devide key. Now works as well.
Offline fool  
#3 Posted : Monday, May 7, 2012 12:00:16 PM(UTC)
fool

Joined: 8/24/2011(UTC)
Posts: 34
Location: New Zealand

Thanks: 4 times
The 'normal slash' was already working for me... it manifests as OemQuestion or InputButton.Question. Divide is the NumPad key.
Offline Benjamin  
#4 Posted : Monday, May 7, 2012 12:06:16 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Yeah, I just saw some outdated page, which also said 11 is sometimes used for non English keyboards for the divide key. 111 was returned for me as well, but I use an US keyboard with my own layout ..

While at it I noticed the Separator key was also commented out, which is now supported again.
Offline fool  
#5 Posted : Monday, May 7, 2012 12:09:24 PM(UTC)
fool

Joined: 8/24/2011(UTC)
Posts: 34
Location: New Zealand

Thanks: 4 times
Separator key? Do you mean '|', which is already working as OemPipe or InputButton.Pipe?
Offline Benjamin  
#6 Posted : Monday, May 7, 2012 3:57:11 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
I guess it is just the '.' on most keyboards (',' in german), e.g. on the numpad left side of the enter key.
Offline fool  
#7 Posted : Thursday, May 10, 2012 12:43:53 PM(UTC)
fool

Joined: 8/24/2011(UTC)
Posts: 34
Location: New Zealand

Thanks: 4 times
Oh okay, so the currency 'separator'? I haven't played around with international keyboards, so it's interesting to know that key (left of NumPad Enter) changes from '.' to ',' for example. Makes sense.
Offline Benjamin  
#8 Posted : Thursday, May 10, 2012 1:33:23 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
I just tested the Separator key (108) and it is not returned when pressing any of the NumPad keys. In some documentations it also seems to be the NumPad Enter key itself, which makes sense since the '.' numpad key is just called Decimal (110). For me the Enter key is returned when pressing NumPad Enter and I removed the Separator enum value again and interprete it now as a normal enter key press.

Btw: There are about 50 more commented out key codes, but I don't think anyone will need them anytime soon (like Sleep, Calculator, F13, etc.). Commented out key codes does not mean they won't be handled, you just don't have an enum value for them. For example if you want to check the Sleep keycode (95) you can just check it without it being supported directly in the InputButton enum:

Code:

  if (Input.Keyboard.GetState((InputButton)95) == InputState.Pressed)
  {
    // Sleep key was just pressed
  }


Here are some links for key codes (which is mostly useless documentation ^^):
http://msdn.microsoft.co...windows/desktop/dd375731(v=vs.85).aspx
http://nehe.gamedev.net/..._virtualkey_codes/15009/
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.102 seconds.