src/keyboard.c

changeset 94
80872ecf64fa
parent 92
3d5680edc1f0
child 96
45ae4c97155b
     1.1 diff -r 09e3ddeb869a -r 80872ecf64fa src/keyboard.c
     1.2 --- a/src/keyboard.c	Thu Feb 10 01:08:32 2011 +0000
     1.3 +++ b/src/keyboard.c	Thu Feb 10 01:09:04 2011 +0000
     1.4 @@ -182,9 +182,6 @@
     1.5  			return;
     1.6  	}
     1.7  
     1.8 -	// If we got here, then the keystate must have changed...!
     1.9 -	ks->update_flag = true;
    1.10 -
    1.11  	// scan the keymap
    1.12  	for (int i=0; i < sizeof(keymap)/sizeof(keymap[0]); i++) {
    1.13  		if (keymap[i].key == ev->key.keysym.sym) {
    1.14 @@ -193,12 +190,14 @@
    1.15  				// Yes -- need ALT set when pressing the key for this to be a match
    1.16  				if (ev->key.keysym.mod & KMOD_ALT) {
    1.17  					ks->keystate[keymap[i].scancode] = v;
    1.18 +					ks->update_flag = true;
    1.19  					break;
    1.20  				}
    1.21  			} else {
    1.22  				// Standard Map key. ALT must NOT be pressed for this to be a match
    1.23  				if (!(ev->key.keysym.mod & KMOD_ALT)) {
    1.24  					ks->keystate[keymap[i].scancode] = v;
    1.25 +					ks->update_flag = true;
    1.26  					break;
    1.27  				}
    1.28  			}