From: James S. <jsi...@us...> - 2002-01-08 18:27:27
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv17584 Modified Files: keyboard.c Log Message: Fixed non sticky ALT key problem. Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/keyboard.c,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- keyboard.c 2001/12/27 18:59:52 1.63 +++ keyboard.c 2002/01/08 18:27:24 1.64 @@ -276,22 +276,24 @@ */ void compute_shiftstate(void) { - int i, j, sym, val; + int i, j, k, sym, val; shift_state = 0; memset(shift_down, 0, sizeof(shift_down)); for(i = 0; i < SIZE(key_down); i += BITS_PER_LONG) { - if (!key_down[i / BITS_PER_LONG]) + if (!key_down[i]) continue; - for(j = 0; j < BITS_PER_LONG; j++) { + k = i*BITS_PER_LONG; - if (!test_bit(i + j, key_down)) + for(j = 0; j < BITS_PER_LONG; j++, k++) { + + if (!test_bit(k, key_down)) continue; - sym = U(key_maps[0][i + j]); + sym = U(key_maps[0][k]); if (KTYP(sym) != KT_SHIFT && KTYP(sym) != KT_SLOCK) continue; |