/[rdesktop]/sourceforge.net/trunk/rdesktop/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 /sourceforge.net/trunk/rdesktop/xkeymap.c

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

revision 706 by astrand, Tue Jun 1 08:06:02 2004 UTC revision 910 by astrand, Tue Jun 7 11:21:53 2005 UTC
# Line 2  Line 2 
2     rdesktop: A Remote Desktop Protocol client.     rdesktop: A Remote Desktop Protocol client.
3     User interface services - X keyboard mapping     User interface services - X keyboard mapping
4    
5     Copyright (C) Matthew Chapman 1999-2002     Copyright (C) Matthew Chapman 1999-2005
6     Copyright (C) Peter Astrand <peter@cendio.se> 2003     Copyright (C) Peter Astrand <peter@cendio.se> 2003
7        
8     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
# Line 40  Line 40 
40  extern Display *g_display;  extern Display *g_display;
41  extern Window g_wnd;  extern Window g_wnd;
42  extern char keymapname[16];  extern char keymapname[16];
43  extern int keylayout;  extern int g_keylayout;
44  extern int g_win_button_size;  extern int g_win_button_size;
45  extern BOOL g_enable_compose;  extern BOOL g_enable_compose;
46  extern BOOL g_use_rdp5;  extern BOOL g_use_rdp5;
# Line 137  xkeymap_read(char *mapname) Line 137  xkeymap_read(char *mapname)
137                  /* map */                  /* map */
138                  if (strncmp(line, "map ", 4) == 0)                  if (strncmp(line, "map ", 4) == 0)
139                  {                  {
140                          keylayout = strtol(line + 4, NULL, 16);                          g_keylayout = strtol(line + 4, NULL, 16);
141                          DEBUG_KBD(("Keylayout 0x%x\n", keylayout));                          DEBUG_KBD(("Keylayout 0x%x\n", g_keylayout));
142                          continue;                          continue;
143                  }                  }
144    
# Line 372  handle_special_keys(uint32 keysym, unsig Line 372  handle_special_keys(uint32 keysym, unsig
372                              && (get_key_state(state, XK_Alt_L) || get_key_state(state, XK_Alt_R)))                              && (get_key_state(state, XK_Alt_L) || get_key_state(state, XK_Alt_R)))
373                                  return True;                                  return True;
374                          break;                          break;
375    
376                  case XK_Num_Lock:                  case XK_Num_Lock:
377                          /* FIXME: We might want to do RDP_INPUT_SYNCHRONIZE here, if g_numlock_sync */                          /* Synchronize on key release */
378                          if (!g_numlock_sync)                          if (g_numlock_sync && !pressed)
379                                  /* Inhibit */                                  rdp_send_input(0, RDP_INPUT_SYNCHRONIZE, 0,
380                                  return True;                                                 ui_get_numlock_state(read_keyboard_state()), 0);
381    
382                            /* Inhibit */
383                            return True;
384                          break;                          break;
385    
386          }          }
# Line 408  xkeymap_translate_key(uint32 keysym, uns Line 412  xkeymap_translate_key(uint32 keysym, uns
412                  }                  }
413          }          }
414    
415            if ((tr.modifiers & MapLeftShiftMask) && ((remote_modifier_state & MapLeftCtrlMask)
416                                                      || (remote_modifier_state & MapRightCtrlMask))
417                && get_key_state(state, XK_Caps_Lock))
418            {
419                    DEBUG_KBD(("CapsLock + Ctrl pressed, releasing LeftShift\n"));
420                    tr.modifiers ^= MapLeftShiftMask;
421            }
422    
423          if (tr.scancode != 0)          if (tr.scancode != 0)
424          {          {
425                  DEBUG_KBD(("Found key translation, scancode=0x%x, modifiers=0x%x\n",                  DEBUG_KBD(("Found key translation, scancode=0x%x, modifiers=0x%x\n",

Legend:
Removed from v.706  
changed lines
  Added in v.910

  ViewVC Help
Powered by ViewVC 1.1.26