INSTALL.txt
author Sam Lantinga <slouken@libsdl.org>
Sat, 27 Jul 2013 03:20:09 -0700
changeset 7526 6c0f0280149c
parent 7227 74109eae3381
child 9025 d09d4b578e77
permissions -rw-r--r--
Fixed bug 1272 - Bogus numlock key up/down events being reported on MacOS X Vern Jensen The problem is that in certain situations I'm getting THREE keyUp/keyDown events when I push certain keys. In my event code I added: case SDL_KEYUP: printf("SDL KeyScanCode for KEYUP event: %d\n", event->key.keysym.scancode ); … and case SDL_KEYDOWN: printf("SDL KeyScanCode for KEYDOWN event: %d\n", event->key.keysym.scancode ); … The result of one test run where I push 2 keys and then release them is this: SDL KeyScanCode for KEYDOWN event: 92 // Pushed keypad 4 SDL KeyScanCode for KEYDOWN event: 83 // Pushed left shift SDL KeyScanCode for KEYUP event: 83 SDL KeyScanCode for KEYDOWN event: 225 SDL KeyScanCode for KEYUP event: 92 // Released keypad 4 SDL KeyScanCode for KEYDOWN event: 83 SDL KeyScanCode for KEYUP event: 83 SDL KeyScanCode for KEYUP event: 225 // Released left shift There *should* be only a total of 4 events above… 2 for each key being pushed, and 2 for each being released. But instead some bogus events for numlock being pushed/released are sent from SDL. These events did not occur. I did not push numlock. The value above for numlock is 83. Comments above show when I pushed each key. As you can see, when I push left shift, THREE events are instantly sent to my application, keyDown and then keyUp for numlock, and then the valid event for left shift (the key that was actually pushed). You could replace keypad 4 with pretty much any keyPad key and it'll still happen. You can also replace it with any arrow key and it'll happen. However, when trying it with normal letter keys on the main keyboard it didn't. It happens with other modifier keys too, not just left shift. The order in which the keys are pressed matter. For instance, if I do: 1) keypad 4 2) left shift 3) release left shift 4) release keypad 4 Then at step 2, I get the 3 events above (when there should be only one), but steps 3 and 4 work properly… I don't get extra keyUp/keyDown events for steps 3 or 4. Thereas if the order of steps 3 and 4 are reversed, I get the bogus extra events for numlock. Also, the problem can occur even when pushing just a single key by itself. If I push left shift, then keypad 4, then release left shift, then release keypad 4, then the following push of left shift will cause the bug. If I continue pushing and releasing left shift though, it won't happen again until I again involve keypad keys. --- Sam Lantinga According to the Apple documentation, NSNumericPadKeyMask is set for any arrow or numeric keypad event. Indeed this is what's happening. I verified that we get the correct events for the numlock key and the mod state gets set correcly, so it should be safe to remove this bogus code.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7222
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
     1
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
     2
To compile and install SDL:
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
     3
7227
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
     4
    1.  Windows with Visual Studio:
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
     5
        * Read VisualC.html
7222
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
     6
7227
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
     7
        Windows with gcc, either native or cross-compiling:
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
     8
        * Read the FAQ at http://wiki.libsdl.org/moin.fcg/FAQWindows
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
     9
        * Run './configure; make; make install'
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    10
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    11
        Mac OS X with Xcode:
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    12
        * Read README-macosx.txt
7222
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    13
7227
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    14
        Mac OS X from the command line:
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    15
        * Run './configure; make; make install'
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    16
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    17
        Linux and other UNIX systems:
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    18
        * Run './configure; make; make install'
7222
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    19
7227
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    20
        Android:
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    21
        * Read README-android.txt
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    22
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    23
        iOS:
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    24
        * Read README-ios.txt
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    25
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    26
        Using Cmake:
74109eae3381 Updated the installation instructions to cover all supported platforms
Sam Lantinga <slouken@libsdl.org>
parents: 7222
diff changeset
    27
        * Read README-cmake.txt
7222
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    28
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    29
    2.  Look at the example programs in ./test, and check out the online
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    30
        documentation at http://wiki.libsdl.org/
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    31
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    32
    3.  Join the SDL developer mailing list by sending E-mail to
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    33
    	sdl-request@libsdl.org
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    34
        and put "subscribe" in the subject of the message.
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    35
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    36
        Or alternatively you can use the web interface:
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    37
            http://www.libsdl.org/mailing-list.php
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    38
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    39
That's it!
2435b221d77d Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems.
Sam Lantinga <slouken@libsdl.org>
parents: 6878
diff changeset
    40
Sam Lantinga <slouken@libsdl.org>