diff options
Diffstat (limited to 'src/SearchBar.cpp')
-rw-r--r-- | src/SearchBar.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/SearchBar.cpp b/src/SearchBar.cpp index 5c5b860..9b5e882 100644 --- a/src/SearchBar.cpp +++ b/src/SearchBar.cpp @@ -92,8 +92,10 @@ namespace QuickMedia { backspace_pressed = true; else if(event.type == sf::Event::KeyReleased && event.key.code == sf::Keyboard::Backspace) backspace_pressed = false; - if(event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::V && event.key.control) - append_text(sf::Clipboard::getString()); + if(event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::V && event.key.control) { + auto clipboard = sf::Clipboard::getString().toUtf8(); + append_text(std::string(clipboard.begin(), clipboard.end())); + } if(event.type == sf::Event::TextEntered && event.text.unicode != 8 && event.text.unicode != 127) // 8 = backspace, 127 = del onTextEntered(event.text.unicode); else if(event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Backspace) |