Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - s4weng

Pages: [1]
1
General / Re: Space key not read
« on: June 21, 2015, 05:27:58 am »
That's the way keyboards are made. Your problem is called keyboard ghosting.

Oh that's interesting, thanks very much for the help, appreciate it!

2
General / Re: Strange Keyboard Relations?
« on: June 20, 2015, 07:13:13 am »
I barely understand what you mean.
When pressing and releasing a key it triggers 3 events: KeyPressed, KeyReleased and TextEntered. The unicode value of 'a' is 97. When using an event, be sure to check the event type before using its values.

Sorry, even as I typed it I barely knew what I was saying.  Your post answered my question though, so thank you!

Edit - Rephrased my issue...I think it's a bit clearer now.

3
General / Space key not read
« on: June 20, 2015, 06:37:43 am »
Hey all!

Rephrased issue:

If the sequence of keys being pressed (and held) is Up + Left + Space or Left + Up + Space; the Space key press isn't recorded.  If it's something like Up + Right + Space or Right + Down + Space it's fine.

Tested on my current project, and also the code used in the  "Game from Scratch: Pang in C++" tutorial.

(Original question:)
/* I'm getting a strange read on some of the input key events, as in when I press a key, it's seen as an event, then the release is seen as an event, but then there's one more event.  I implemented a keyToString function to output these keys.

/When I press A, I get A, F13, then A again. (0, 97)
B -> B, F14, B (1, 98)
C -> C, F15, C (2, 99)
D -> D, Pause, D (3, 100)
Return -> Return, N, Return (58, 13)

The numbers in the bracket are the enumerator indices related to the keys as specified by the documentations: http://www.sfml-dev.org/documentation/2.0/classsf_1_1Keyboard.php

I don't think all the keys do this, but these are some of the ones I tested out.

What I don't understand is, what does the event type does the middle key represent? */

Thanks in advance!

Pages: [1]