On an embedded system (running Raspbian Stretch without X) I have a C++ application that sometimes "grabs" the raw keyboard inputs from /dev/input/event*.
When this happens (I set a flag in my code, so I know when) I want to disable the current virtual terminal (tty). This is to avoid to send commands to the o.s. when the user types.
Please note I don't want to disable the tty entirely! I just want to unbind the keyboard input from it.