aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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();