/[rdesktop]/jpeg/rdesktop/trunk/xkeymap.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /jpeg/rdesktop/trunk/xkeymap.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 67 by jsorg71, Tue Jul 23 01:53:04 2002 UTC revision 69 by astrand, Sat Jul 27 22:35:38 2002 UTC
# Line 163  xkeymap_read(char *mapname) Line 163  xkeymap_read(char *mapname)
163                          MASK_ADD_BITS(modifiers, MapNumLockMask);                          MASK_ADD_BITS(modifiers, MapNumLockMask);
164                  }                  }
165    
166                    if (strstr(line_rest, "localstate"))
167                    {
168                            MASK_ADD_BITS(modifiers, MapLocalStateMask);
169                    }
170    
171                  add_to_keymap(keyname, scancode, modifiers, mapname);                  add_to_keymap(keyname, scancode, modifiers, mapname);
172    
173                  if (strstr(line_rest, "addupper"))                  if (strstr(line_rest, "addupper"))
# Line 211  xkeymap_init2(void) Line 216  xkeymap_init2(void)
216    
217    
218  key_translation  key_translation
219  xkeymap_translate_key(KeySym keysym, unsigned int keycode)  xkeymap_translate_key(KeySym keysym, unsigned int keycode, unsigned int state)
220  {  {
221          key_translation tr = { 0, 0 };          key_translation tr = { 0, 0 };
222    
223          tr = keymap[keysym & KEYMAP_MASK];          tr = keymap[keysym & KEYMAP_MASK];
224    
225            if (tr.modifiers & MapLocalStateMask)
226            {
227                    /* The modifiers to send for this key should be obtained
228                       from the local state. Currently, only shift is implemented. */
229                    if (state & ShiftMask)
230                    {
231                            tr.modifiers = MapLeftShiftMask;
232                    }
233            }
234    
235          if (tr.scancode != 0)          if (tr.scancode != 0)
236          {          {
237                  DEBUG_KBD                  DEBUG_KBD

Legend:
Removed from v.67  
changed lines
  Added in v.69

  ViewVC Help
Powered by ViewVC 1.1.26