Hello,
As I was using
sf::Event to handle keyboard input, I realized that the
keypad period key was not generating event, like the "normal" period key did.
I looked into the SFML source code and I found the
SFML/Window/OSX/HIDInputManager.mm file with:
// case 0x41: /* keypad */ return sf::Keyboard::Period;
case 0x2f: /* keyboard */ return sf::Keyboard::Period;
case 0x27: return sf::Keyboard::Quote;
case 0x2c: return sf::Keyboard::Slash;
case 0x2a: return sf::Keyboard::BackSlash;
#warning sf::Keyboard::Tilde might be in conflict with some other key.
// 0x0a is for "Non-US Backslash" according to HID Calibrator,
// a sample provided by Apple.
case 0x0a: return sf::Keyboard::Tilde;
// case 0x51: /* keypad */ return sf::Keyboard::Equal;
case 0x18: /* keyboard */ return sf::Keyboard::Equal;
case 0x32: return sf::Keyboard::Dash;
case 0x31: return sf::Keyboard::Space;
// case 0x4c: /* keypad */ return sf::Keyboard::Return;
case 0x24: /* keyboard */ return sf::Keyboard::Return;
We can see that the
keypad keys are commented. I can't figure out why as I
successfully recompiled the library after uncommenting these values and
had it work.
Here is my question: why are these values commented and is it possible to change the default behavior so that keypad keys are treated like "normal" keys?