Skip to content
Advertisement

Tag: keyboard-events

CTRL+C not handled in python script when using su

I have a Python code like this. While the KeyboardInterrupt is handled fine if I run the python script by myself, it is not handled if I run it as another user using su, like this. How can I solve this problem? Answer The su command creates a new interactive shell and executes the command inside it. When you use

Remap a keyboard with ioctl under linux

I am actually trying to write a small program to catch global keyboard inputs from specific USB keyboards under linux. I am testing with this piece of code : Ths point is that I don’t know how to change some input key by other. I tried by calling write() on currently red event by changing the event code, sent key

Flush/Clear System.in (stdin) before reading

At work, we have 5 RFID readers attached to a PC running Linux. The readers are all recognized as keyboards and send their input (what they read form the Chip) as an key-input-event sequence. To be able to tell which reader send what sequence, I’m doing a raw-read over /dev/input/XX and get their input this way. The problem with this

Advertisement