src/keyboard.c

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