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 - OMGOuned

Pages: [1]
1
I made a pull request at https://github.com/SFML/SFML/pull/401.
I thought it would be good to handle caps lock events so I modified few more files than expected.
I hope my modifications to "Keyboard.hpp" will fit with other platforms.

2
I'll create a pull request so :). I'm going to update the virtual codes according to the "Events.h" from the HIToolbox Carbon framework and "NSEvent.h" from AppKit.

3
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?

Pages: [1]