Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no TextEntered event on backspace/delete on mac #192

Closed
texus opened this issue Apr 1, 2012 · 6 comments
Closed

no TextEntered event on backspace/delete on mac #192

texus opened this issue Apr 1, 2012 · 6 comments

Comments

@texus
Copy link
Contributor

texus commented Apr 1, 2012

When pressing the backspace or delete key no TextEntered events are sent on Mac OS X (Lion).
Only the KeyPressed events are sent.

More information: http://en.sfml-dev.org/forums/index.php?topic=7450.0

@ghost ghost assigned mantognini Apr 1, 2012
@mantognini
Copy link
Member

I guess Apple's engineers did something wrong with the unicode values. The two following keys are not bound to the correct unicode value.

backspace
Key Down
Characters: �
Unicode:        127 / 0x7f
Keys:       ⌫
Key Code:   51 / 0x33
Modifiers:  256 / 0x100
delete
Key Down
Characters: 
Unicode:        63272 / 0xf728
Keys:       ⌦
Key Code:   117 / 0x75
Modifiers:  8388864 / 0x800100

@retep998
Copy link

Differing behavior of keyboards based on OS/localization?
Yet another case of issue #7?

@mantognini
Copy link
Member

hum... not really. In issue #7 we are discussing sf::Event::Key(Pressed|Released) implementation.

In this (#192) issue we have a bug with sf::Event::TextEntered which is not related to the above event. Here the physical key doesn't matter but the "global" keyboard state matter in order to distinguish 'A' from 'a' and so on.

Note that this bug seems to be on Apple's side.

@CelticMinstrel
Copy link

I'm not sure why you'd expect backspace and delete to be seen as text entry? They don't produce any character you'd want to insert into a string being edited.

@mantognini
Copy link
Member

It's useful to erase the last char of a string without mixing both KeyReleased and TextEntered events. See some code samples on the forum for a proper example.

@CelticMinstrel
Copy link

I guess it can be useful; I think mixing the events is generally the better way to go though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants