T
T
Tolik2014-03-25 16:38:55
linux
Tolik, 2014-03-25 16:38:55

Linux (Ubuntu) how to intercept a specific button press (not from the keyboard)?

I have this awesome laptop. There, next to the on / off button, there is a small button, which on Win is supposedly intended to restore (probably, a backup should be made before that) of the system.
Okay, I don't have Windows. Ubuntu doesn't support this feature anyway. That is why I would like to bind my action (let it be the execution of a specific script) to this button. How to implement it? The fact that "not from the keyboard" should not complicate the task, because. As far as I know, each button has its own code. Here's how to intercept a click on this code (and before that, in fact, find it out).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tolik, 2014-03-25
@Diel

A short search and I figured it out myself:
welinux.ru/post/2458 -- everything you need is here
For the test, the config was as follows:

"echo clicked >> ~/clicked"
m:0x10 + c:156

and it worked great! At each click, a line was added. So I'll put whatever I want on this key

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question