input: keychord: Add keychord driver
Subsystems (2)
PATCH 1/3 input: keychord: Add keychord driver
From: Mike Lockwood <[email protected]>
This driver allows userspace to receive notification when client specified key combinations are pressed.
The client opens /dev/keychord and writes a list of keychords for the driver to monitor.
The client then reads or polls /dev/keychord for notifications. A client specified ID for the keychord is returned from read() when a keychord press is detected.
keychord: fix to build without CONFIG_PREEMPT
--- drivers/input/misc/Kconfig | 11 ++ drivers/input/misc/Makefile | 1 + drivers/input/misc/keychord.c | 387 +++++++++++++++++++++++++++++++++++++++++ include/linux/keychord.h | 52 ++++++ 4 files changed, 451 insertions(+) create mode 100644 drivers/input/misc/keychord.c create mode 100644 include/linux/keychord.h
drivers/input/misc/Kconfig +11 -0
@@ -341,6 +341,17 @@ config INPUT_ATI_REMOTE2 To compile this driver as a module, choose M here: the module will be called ati_remote2. +config INPUT_KEYCHORD + tristate "Key chord input driver support" + help + Say Y here if you want to enable the key chord driver + accessible at /dev/keychord. This driver can be used + for receiving notifications when client specified key + combinations are pressed. + + To compile this driver as a module, choose M here: the + module will be called keychord. + config INPUT_KEYSPAN_REMOTE tristate "Keyspan DMR USB remote control" depends on USB_ARCH_HAS_HCD
drivers/input/misc/Makefile +1 -0
@@ -37,6 +37,7 @@ obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o obj-$(CONFIG_INPUT_IMS_PCU) += ims-pcu.o obj-$(CONFIG_INPUT_IXP4XX_BEEPER) += ixp4xx-beeper.o +obj-$(CONFIG_INPUT_KEYCHORD) += keychord.o obj-$(CONFIG_INPUT_KEYSPAN_REMOTE) += keyspan_remote.o obj-$(CONFIG_INPUT_KXTJ9) += kxtj9.o obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o
drivers/input/misc/keychord.c new file +387 -0
387 lines not on this page · raw message
include/linux/keychord.h new file +52 -0
52 lines not on this page · raw message
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Dmitry Torokhov
maintainerQuoted 10 lines · Bálint Czobor
From: Mike Lockwood <[email protected]>
This driver allows userspace to receive notification when client specified key combinations are pressed.
The client opens/dev/keychordand writes a list of keychords for the driver to monitor.
The client then reads or polls/dev/keychordfor notifications. A client specified ID for the keychord is returned fromread()when a keychord press is detected.
Quoted 3 lines
Signed-off-by Mike Lockwood <[email protected]>keychord: fix to build without
CONFIG_PREEMPT
Why does this need to be in the kernel?
Thanks.
Signature · 1 line
Dmitry