| 710 | // Append information to string about a keyboard event |
| 711 | template <typename KeyEventType> |
| 712 | sf::String keyEventDescription(sf::String text, const KeyEventType& keyEvent) |
| 713 | { |
| 714 | text += "\n\n"; |
| 715 | text += keyIdentifier(keyEvent.code); |
| 716 | text += "\n"; |
| 717 | text += scancodeIdentifier(keyEvent.scancode); |
| 718 | if (somethingIsOdd(keyEvent)) |
| 719 | { |
| 720 | text += "\nLocalized:\t"; |
| 721 | text += keyIdentifier(sf::Keyboard::localize(keyEvent.scancode)); |
| 722 | text += "\nDelocalized:\t"; |
| 723 | text += scancodeIdentifier(sf::Keyboard::delocalize(keyEvent.code)); |
| 724 | } |
| 725 | |
| 726 | return text; |
| 727 | } |
| 728 | |
| 729 | // Make a string describing a text event |
| 730 | sf::String textEventDescription(const sf::Event::TextEntered& textEntered) |
no test coverage detected