Access LCD4 buttons on BBB Debian?

Hi,

Can someone give pointers for how to hijack one or more of the up-down-right-left-enter buttons on the LCD4 for use in a user program? I.e. disconnect from Xorg(?) and connect to my code, preferably Python. I’m running Debian Wheezy.

I’m aware of Adafruit’s BBIO package, which might do the job, if the buttons weren’t already committed.

This must be a common need.

Thanks!