I at one time could program in C++ but my mind won't work that way any
more. Remember that Linux is a multi-user multi-Processing system.
Setting up a user account will give the user only so many permissions as
set by the administrator/super user.
1. Keep all distractions off the desktop for your user accounts. (don't
offer any options not needed for your application)
2. Build a help file and menu that clearly defines the control functions
to reduce experimenting.
3. Only offer operator sign out and switch, not shut down or other
options on their desktop.
4. Build a keystroke call to the system that only responds to keystrokes
defined by the program, I don't remember the function call or name.
5. You can move the control key location in the keyboard layout in
system tools to make tampering more difficult.
6. Misbehaving applications can't take control of Linux as they can in
doze. If you must accept only keystrokes in your control that are
defined, and not any other keystroke. You may be better off with a
dedicated controller that accepts only communication from your control
computer that it understands (you have defined), via USB or serial cable.
At one time you could get a fourth compiler for the Micro chip pic
controllers, (The controllers I used in my applications). I however
programmed them in assembly so could not tell you how well those
compilers worked. I have notices some cross compilers in the
repositories that you might check out.
I hope this gave you some Ideas as to how to cure your dilemma.