ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/keyboard.C
(Generate patch)

Comparing rxvt-unicode/src/keyboard.C (file contents):
Revision 1.5 by root, Sun Jan 16 19:03:45 2005 UTC vs.
Revision 1.6 by root, Sun Jan 16 19:20:30 2005 UTC

236bool 236bool
237keyboard_manager::dispatch (rxvt_term *term, KeySym keysym, unsigned int state) 237keyboard_manager::dispatch (rxvt_term *term, KeySym keysym, unsigned int state)
238{ 238{
239 assert (hash[0] == 0 && "register_done() need to be called"); 239 assert (hash[0] == 0 && "register_done() need to be called");
240 240
241 if (state & term->ModMetaMask) 241 if (state & term->ModMetaMask) state |= MetaMask;
242 state |= MetaMask;
243
244 if (state & term->ModNumLockMask) 242 if (state & term->ModNumLockMask) state |= NumLockMask;
245 state |= NumLockMask; 243 if (state & term->ModLevel3Mask) state |= Level3Mask;
246 244
247 if (!!(term->priv_modes & PrivMode_aplKP) != !!(state & ShiftMask)) 245 if (!!(term->priv_modes & PrivMode_aplKP) != !!(state & ShiftMask))
248 state |= AppKeypadMask; 246 state |= AppKeypadMask;
249 247
250 int index = find_keysym (keysym, state); 248 int index = find_keysym (keysym, state);
435 { 433 {
436 keysym_t *a = sorted_keymap[i]; 434 keysym_t *a = sorted_keymap[i];
437 for (int j = 0; j < a->range; ++j) 435 for (int j = 0; j < a->range; ++j)
438 { 436 {
439 int index = find_keysym (a->keysym + j, a->state & OtherModMask); 437 int index = find_keysym (a->keysym + j, a->state & OtherModMask);
438
440 assert (index >= 0); 439 assert (index >= 0);
441 keysym_t *b = keymap [index]; 440 keysym_t *b = keymap [index];
442 assert (i == (signed) index || // the normally expected result 441 assert (i == (signed) index || // the normally expected result
443 (a->keysym + j) >= b->keysym && (a->keysym + j) <= (b->keysym + b->range) && compare_priority (a, b) <= 0); // is effectively the same 442 (a->keysym + j) >= b->keysym && (a->keysym + j) <= (b->keysym + b->range) && compare_priority (a, b) <= 0); // is effectively the same
444 } 443 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines