- /* 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);
+ 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];
+ if (sym != NoSymbol) {
+ /* bind the key to the mask (e.g. Alt_L => Mod1Mask) */
+ set_modkey_mask(nth_mask(i), sym);
+ }