Re: Query last reported event state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

On Tue, Nov 24, 2009 at 06:33:56PM +0100, Daniel Mack wrote:
> Hi,
> 
> is there a way to query the last state an input device reported,
> preferably even for a special key mask? When a button is pressed and a
> userspace application is started, it should be able to figure out the
> current state, especially because those GPIO signals are likely
> connected to other peripherals to report arbitrary events in the system.
> Is there any such framework for that purpose?

Not sure whether this helps, but you can look <linux/input.h> and
check what ioctl()s it provides for this purpose. At least there
seems to be:
	EVIOCGKEY - get global keystate
	EVIOCGSW - get all switch states
	EVIOCGBIT - get event bits

Maybe you can use some of these to query current status of input events.

MW
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux