From 1308676e46b4c44886f67e40a90ac4a9b6c811b0 Mon Sep 17 00:00:00 2001 From: mckset <99543950+mckset@users.noreply.github.com> Date: Wed, 1 Feb 2023 19:58:58 -0500 Subject: [PATCH] Fixed buttons being stuck down --- KD100.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/KD100.c b/KD100.c index 1d6b7f9..942c002 100644 --- a/KD100.c +++ b/KD100.c @@ -1,5 +1,5 @@ /* - V1.0 - stable + V1.1 - minor fix https://github.com/mckset/KD100.git KD 100 Linux driver for X11 desktops Other devices can be supported by modifying the code to read data received by the device @@ -186,9 +186,11 @@ void GetDevice(int debug){ if (debug == 1 && keycode != 0){ printf("Keycode: %d\n", keycode); } + printf("prevType: %d\n", prevType); if (keycode == 0 && prevType != 0){ // Reset key held Handler(prevKey, prevType); - prevType = 0; + strcpy(prevKey, ""); + prevType=0; } if (keycode == 641){ // Wheel Clockwise Handler(wheelEvents[wheelFunction], -1);