This repository includes a raw input implementation for Linux and Windows (hornta's work). It would be nice if somebody could work out an implementation for OSX.
Refer to the official installation instructions.
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
sf::RenderWindow window(sf::VideoMode(400, 400), "Test");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
{
window.close();
}
else if (event.type == sf::Event::MouseMovedRaw)
{
std::cout << "Motion: x = ";
std::cout << event.mouseMoveRaw.dx;
std::cout << ", y = ";
std::cout << event.mouseMoveRaw.dy;
std::cout << std::endl;
}
}
window.clear();
window.display();
}
return EXIT_SUCCESS;
}