From 8468d9bd5c66fe402acbc06f728b12ea996848de Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 20 Jan 2012 02:58:09 -0600 Subject: Replicate LED status from virtual keyboards to physical keyboards Fix keyboard attribute cloning This commit closes Bug 561 --- tsak/main.cpp | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) (limited to 'tsak') diff --git a/tsak/main.cpp b/tsak/main.cpp index df485a0e0..26aad0041 100644 --- a/tsak/main.cpp +++ b/tsak/main.cpp @@ -126,22 +126,23 @@ static void copy_features(int devin, int devout) for(i=0;i= 0) { + for(code=0;code= size) { + if (revev.type == EV_LED) { + write(keyboard_fds[current_keyboard], &revev, sizeof(revev)); + } + } value = ev[0].value; @@ -506,7 +516,7 @@ int main (int argc, char *argv[]) } } - if (hide_event == false) { + if ((hide_event == false) && (ev[0].type != EV_LED) && (ev[1].type != EV_LED)) { // Pass the event on... event = ev[0]; write(devout[current_keyboard], &event, sizeof event); -- cgit v1.2.3