Although I don't play Geometry Dash, but I know what you mean. In the old DOS days, I wrote many simple games using CRT unit and direct screen memory mapping (I don't use Graph). To make keyboard trapping easier to use in my games, I even wrote my own keyboard module.
But that was many years ago. Now I use Linux, unit CRT can't run my Linux 64-bit. And I now busy learning and writing my cross platform (Windows, Linux, Android) graphics library.
Things related with CRT unit means old things to me. Memories are nostalgic, but I live in now and future.
I will leave this question to someone else more capable to answer.
But if I'm not wrong, SDL already include keyboard/mouse trapping functions.