///////////////////////////////////////////////////////
| 790 | |
| 791 | //////////////////////////////////////////////////////////// |
| 792 | Keyboard::Key KeyboardImpl::getKeyFromEvent(XKeyEvent& event) |
| 793 | { |
| 794 | // Try each KeySym index (modifier group) until we get a match |
| 795 | for (int i = 0; i < 4; ++i) |
| 796 | { |
| 797 | // Get the SFML keyboard code from the keysym of the key that has been pressed |
| 798 | const KeySym keysym = XLookupKeysym(&event, i); |
| 799 | const Keyboard::Key key = keySymToKey(keysym); |
| 800 | if (key != Keyboard::Key::Unknown) |
| 801 | return key; |
| 802 | } |
| 803 | |
| 804 | return Keyboard::Key::Unknown; |
| 805 | } |
| 806 | |
| 807 | |
| 808 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected