Fixed modifier bug

This commit is contained in:
fluxgen 2002-01-05 12:01:16 +00:00
parent 758f4b0c16
commit 7083cd088a

View file

@ -199,24 +199,19 @@ bool Keys::load(char *filename) {
else if (keyarg>1) { else if (keyarg>1) {
//keyarg=0; //keyarg=0;
key = getKey(val); int tmpmod=getModifier(val);
if (!key){ //if no keycode was found try the modifier if(tmpmod) mod|=tmpmod; //If it's a modifier
int tmpmod = getModifier(val); else{
if (tmpmod) key = getKey(val); // else get the key
mod |= tmpmod; //add it to modifier if (!current_key) {
current_key = new t_key(key, mod);
} else if (!current_key) { last_key = current_key;
} else {
current_key = new t_key(key, mod); t_key *temp_key = new t_key(key, mod);
last_key = current_key; last_key->keylist.push_back(temp_key);
last_key = temp_key;
} else { }
t_key *temp_key = new t_key(key, mod);
last_key->keylist.push_back(temp_key);
last_key = temp_key;
} }
} }
} else { } else {
@ -303,10 +298,10 @@ bool Keys::load(char *filename) {
return true; return true;
} }
//--------- grabKey --------------- //--------- grabKey ---------------------
// Grabs a key with the modifier // Grabs a key with the modifier
// and with numlock,capslock and scrollock // and with numlock,capslock and scrollock
//--------------------------------- //----------------------------------------
void Keys::grabKey(unsigned int key, unsigned int mod) { void Keys::grabKey(unsigned int key, unsigned int mod) {
Fluxbox *fluxbox = Fluxbox::instance(); Fluxbox *fluxbox = Fluxbox::instance();