all repos — fluxbox @ 7083cd088ac8938ea892477189f9e7627a5c7d4d

custom fork of the fluxbox windowmanager

Fixed modifier bug
fluxgen fluxgen
commit

7083cd088ac8938ea892477189f9e7627a5c7d4d

parent

758f4b0c1672e40c8c69a5f7437727fc84ce09ee

1 files changed, 15 insertions(+), 20 deletions(-)

jump to
M src/Keys.ccsrc/Keys.cc

@@ -197,26 +197,21 @@ keyarg++;

if (keyarg==1) //first arg is modifier mod = getModifier(val); 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) { - - 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; + 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 @@ #endif

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();