aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-01-05 12:01:16 (GMT)
committerfluxgen <fluxgen>2002-01-05 12:01:16 (GMT)
commit7083cd088ac8938ea892477189f9e7627a5c7d4d (patch)
tree408c6db90bf1bafa6d8d6577835247da6efb3cc7
parent758f4b0c1672e40c8c69a5f7437727fc84ce09ee (diff)
downloadfluxbox-7083cd088ac8938ea892477189f9e7627a5c7d4d.zip
fluxbox-7083cd088ac8938ea892477189f9e7627a5c7d4d.tar.bz2
Fixed modifier bug
-rw-r--r--src/Keys.cc35
1 files changed, 15 insertions, 20 deletions
diff --git a/src/Keys.cc b/src/Keys.cc
index 62404ef..59a8789 100644
--- a/src/Keys.cc
+++ b/src/Keys.cc
@@ -197,26 +197,21 @@ bool Keys::load(char *filename) {
197 if (keyarg==1) //first arg is modifier 197 if (keyarg==1) //first arg is modifier
198 mod = getModifier(val); 198 mod = getModifier(val);
199 else if (keyarg>1) { 199 else if (keyarg>1) {
200 200
201 //keyarg=0; 201 //keyarg=0;
202 key = getKey(val); 202 int tmpmod=getModifier(val);
203 if (!key){ //if no keycode was found try the modifier 203 if(tmpmod) mod|=tmpmod; //If it's a modifier
204 int tmpmod = getModifier(val); 204 else{
205 if (tmpmod) 205 key = getKey(val); // else get the key
206 mod |= tmpmod; //add it to modifier 206 if (!current_key) {
207 207 current_key = new t_key(key, mod);
208 } else if (!current_key) { 208 last_key = current_key;
209 209 } else {
210 current_key = new t_key(key, mod); 210 t_key *temp_key = new t_key(key, mod);
211 last_key = current_key; 211 last_key->keylist.push_back(temp_key);
212 212 last_key = temp_key;
213 } else { 213 }
214
215 t_key *temp_key = new t_key(key, mod);
216 last_key->keylist.push_back(temp_key);
217 last_key = temp_key;
218 } 214 }
219
220 } 215 }
221 216
222 } else { 217 } else {
@@ -303,10 +298,10 @@ bool Keys::load(char *filename) {
303 return true; 298 return true;
304} 299}
305 300
306//--------- grabKey --------------- 301//--------- grabKey ---------------------
307// Grabs a key with the modifier 302// Grabs a key with the modifier
308// and with numlock,capslock and scrollock 303// and with numlock,capslock and scrollock
309//--------------------------------- 304//----------------------------------------
310void Keys::grabKey(unsigned int key, unsigned int mod) { 305void Keys::grabKey(unsigned int key, unsigned int mod) {
311 306
312 Fluxbox *fluxbox = Fluxbox::instance(); 307 Fluxbox *fluxbox = Fluxbox::instance();