X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmodkeys.c;h=70605511957b1886d6fe7ab5bc882693fe19f0e3;hb=481e68112177d1a1c0eb920f37c372ea34eeb371;hp=dc5220825cc613eb5ab099580b1c8dab570aa28d;hpb=88d00a0120faa59a7bbdc93c8cbe53be8bc6ba0b;p=chaz%2Fopenbox diff --git a/openbox/modkeys.c b/openbox/modkeys.c index dc522082..70605511 100644 --- a/openbox/modkeys.c +++ b/openbox/modkeys.c @@ -20,6 +20,7 @@ #include "openbox.h" #include +#include /* These masks are constants and the modifier keys are bound to them as anyone sees fit: @@ -63,12 +64,17 @@ void modkeys_startup(gboolean reconfigure) KeySym sym; /* get a keycode that is bound to the mask (i) */ KeyCode keycode = modmap->modifiermap[i*modmap->max_keypermod + j]; - /* go through each keysym bound to the given keycode */ - for (k = 0; k < keysyms_per_keycode; ++k) { - sym = keymap[(keycode-min_keycode) * keysyms_per_keycode + k]; - if (sym != NoSymbol) { - /* bind the key to the mask (e.g. Alt_L => Mod1Mask) */ - set_modkey_mask(nth_mask(i), sym); + g_print("keycode %d for mask %d\n", keycode, i); + if (keycode) { + /* go through each keysym bound to the given keycode */ + for (k = 0; k < keysyms_per_keycode; ++k) { + sym = keymap[(keycode-min_keycode) * keysyms_per_keycode + + k]; + g_print("k %d sym %s \n", k, XKeysymToString(sym)); + if (sym != NoSymbol) { + /* bind the key to the mask (e.g. Alt_L => Mod1Mask) */ + set_modkey_mask(nth_mask(i), sym); + } } } }