Answer the question
In order to leave comments, you need to log in
How to make an Ubuntu keyboard lock widget?
Hello! The problem is that in the same location with me a cat appeared, which is extremely not indifferent to the computer keyboard, always ready to walk on it or take a nap. The laptop has a second keyboard and I disable the laptop keyboard in the terminal using xinput, but I would like to somehow automate this process. I thought to make a widget and put it in the taskbar for quick access to it, but the knowledge is not enough. Ubuntu 14.04 system. Tell me how you can implement or links on the topic?
Thanks in advance!
ps I know java (approximately at the junior level) and, in theory, if a program could access xinput, then this is a button, a listener and one condition, but I don’t know how to apply this to this task. you can try to do it using python, I don’t know it very well, but taking into account the task, I think if I read it, I can.
pss
Intermediate version
Answer the question
In order to leave comments, you need to log in
Python will be easier. Adding an icon to the tray is googled, well, in the callback you do what you wrote with your hands.
Go to ~/.local/share/applications
Open any program in your favorite text editor using the template, enter your name, and paste the command that you wrote in the terminal.
The resulting shortcut for execution will be displayed in the list of all programs, you can pin it to the panel for quick access, you can create a second shortcut to connect back.
I will add.
Locking and generally working with the keyboard requires root rights. Pay attention to this, because. possible problems.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question