I'm looking for a (relatively) simple way to capture mouse events in Python 3.7 on a Raspberry Pi 4 running Raspbian 10 Buster. Would like to control an internet radio player (mpd/mpc) using a mouse. It would be great if a solution worked in both X-server and terminal.
I've tried installing the mouse module which works in X but doesn't work in terminal (Segmentation Error), which is where I want the python code to run when the Pi boots up. I've tried pynput but it requires X server which is a deal breaker...I don't want to boot to desktop. I've tried pygame which worked in older Pi3's but won't run on my Pi4's running Buster (error of 'can't initiate EGL'). Has anyone used SDI 2.0 for mouse event capture? Any solutions welcome.