/[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 553 by astrand, Mon Dec 8 15:28:24 2003 UTC revision 810 by stargo, Sun Jan 23 19:29:31 2005 UTC
# 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 408  xkeymap_translate_key(uint32 keysym, uns Line 408  xkeymap_translate_key(uint32 keysym, uns
408                  }                  }
409          }          }
410    
411            if (((remote_modifier_state & MapLeftCtrlMask)
412                 || (remote_modifier_state & MapRightCtrlMask)) && get_key_state(state, XK_Caps_Lock))
413            {
414                    DEBUG_KBD(("CapsLock + Ctrl pressed, releasing LeftShift\n"));
415                    tr.modifiers ^= MapLeftShiftMask;
416            }
417    
418          if (tr.scancode != 0)          if (tr.scancode != 0)
419          {          {
420                  DEBUG_KBD(("Found key translation, scancode=0x%x, modifiers=0x%x\n",                  DEBUG_KBD(("Found key translation, scancode=0x%x, modifiers=0x%x\n",
# Line 602  ensure_remote_modifiers(uint32 ev_time, Line 609  ensure_remote_modifiers(uint32 ev_time,
609  unsigned int  unsigned int
610  read_keyboard_state()  read_keyboard_state()
611  {  {
612    #ifdef RDP2VNC
613            return 0;
614    #else
615          unsigned int state;          unsigned int state;
616          Window wdummy;          Window wdummy;
617          int dummy;          int dummy;
618    
619          XQueryPointer(g_display, g_wnd, &wdummy, &wdummy, &dummy, &dummy, &dummy, &dummy, &state);          XQueryPointer(g_display, g_wnd, &wdummy, &wdummy, &dummy, &dummy, &dummy, &dummy, &state);
620          return state;          return state;
621    #endif
622  }  }
623    
624    
# Line 652  reset_modifier_keys() Line 663  reset_modifier_keys()
663                  rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_LALT);                  rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_LALT);
664    
665          if (MASK_HAS_BITS(remote_modifier_state, MapRightAltMask) &&          if (MASK_HAS_BITS(remote_modifier_state, MapRightAltMask) &&
666              !get_key_state(state, XK_Alt_R) && !get_key_state(state, XK_Mode_switch))              !get_key_state(state, XK_Alt_R) && !get_key_state(state, XK_Mode_switch)
667                && !get_key_state(state, XK_ISO_Level3_Shift))
668                  rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_RALT);                  rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_RALT);
669    
670          reset_winkey(ev_time);          reset_winkey(ev_time);

Legend:
Removed from v.553  
changed lines
  Added in v.810

  ViewVC Help
Powered by ViewVC 1.1.26