summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--skey.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/skey.c b/skey.c
index de255ab..427f3e4 100644
--- a/skey.c
+++ b/skey.c
@@ -46,11 +46,16 @@ int skey_update_thread (void *data) {
}
//a counter for testing prints
int i = 0;
+ int j = 0;
while (1) {
i++;
i = i % 500;
if (!i) {
printk(KERN_INFO "skey: update thread printed to kernel log every 1s\n");
+ //reports the a button pressed
+ input_report_key(skey_dev,KEY_CAPSLOCK,j);
+ input_sync(skey_dev);
+ j = !j;
}
if (USE_GPIO) {
//reads the keyboard
@@ -138,7 +143,7 @@ static int __init skey_init (void) {
// declares the event code and typesthe device emmits
set_bit(EV_KEY, skey_dev->evbit);
set_bit(EV_REL, skey_dev->evbit);
- set_bit(KEY_A, skey_dev.keybit);
+ set_bit(KEY_CAPSLOCK, skey_dev->keybit);
// registers the device
if (input_register_device(skey_dev)) {
input_free_device(skey_dev);