Hi,
I would like to know, if we can override or control the action of a GPIO-KEY based input events.
Example: I have a gpio configured as an input and connected to a switch/key. In my DTS, I've assigned this key to KEY_POWER
So, the default expected behavior is, when I press this key/switch my device shuts down. So far so good.
Now, what I want to do is, I would like to catch this KEY_POWER PRESSED Event in my custom application and change it's behavior so that it doesn't poweroff the device but does something else.
Reason: Sometimes, you shouldn't trigger power-off just by a simple key press event, because the device might be doing some operation and that needs to be completed, or the used pressed by mistake.
Kindly provide any hints on the same. I wonder if we can control the behavior of a key once it is assigned to a particular driver.