Fixed modifier bug
This commit is contained in:
parent
758f4b0c16
commit
7083cd088a
1 changed files with 16 additions and 21 deletions
21
src/Keys.cc
21
src/Keys.cc
|
@ -199,24 +199,19 @@ bool Keys::load(char *filename) {
|
|||
else if (keyarg>1) {
|
||||
|
||||
//keyarg=0;
|
||||
key = getKey(val);
|
||||
if (!key){ //if no keycode was found try the modifier
|
||||
int tmpmod = getModifier(val);
|
||||
if (tmpmod)
|
||||
mod |= tmpmod; //add it to modifier
|
||||
|
||||
} else if (!current_key) {
|
||||
|
||||
int tmpmod=getModifier(val);
|
||||
if(tmpmod) mod|=tmpmod; //If it's a modifier
|
||||
else{
|
||||
key = getKey(val); // else get the key
|
||||
if (!current_key) {
|
||||
current_key = new t_key(key, mod);
|
||||
last_key = current_key;
|
||||
|
||||
} else {
|
||||
|
||||
t_key *temp_key = new t_key(key, mod);
|
||||
last_key->keylist.push_back(temp_key);
|
||||
last_key = temp_key;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -303,10 +298,10 @@ bool Keys::load(char *filename) {
|
|||
return true;
|
||||
}
|
||||
|
||||
//--------- grabKey ---------------
|
||||
//--------- grabKey ---------------------
|
||||
// Grabs a key with the modifier
|
||||
// and with numlock,capslock and scrollock
|
||||
//---------------------------------
|
||||
//----------------------------------------
|
||||
void Keys::grabKey(unsigned int key, unsigned int mod) {
|
||||
|
||||
Fluxbox *fluxbox = Fluxbox::instance();
|
||||
|
|
Loading…
Reference in a new issue