/[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 203 by matthewc, Thu Sep 26 14:04:30 2002 UTC revision 207 by matthewc, Thu Sep 26 14:26:46 2002 UTC
# Line 1  Line 1 
1  /*  /*
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     Copyright (C) Matthew Chapman 1999-2001     Copyright (C) Matthew Chapman 1999-2002
5        
6     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
# Line 36  extern char keymapname[16]; Line 36  extern char keymapname[16];
36  extern int keylayout;  extern int keylayout;
37  extern BOOL enable_compose;  extern BOOL enable_compose;
38    
39    static BOOL keymap_loaded;
40  static key_translation keymap[KEYMAP_SIZE];  static key_translation keymap[KEYMAP_SIZE];
41  static int min_keycode;  static int min_keycode;
42  static uint16 remote_modifier_state = 0;  static uint16 remote_modifier_state = 0;
# Line 206  xkeymap_init(void) Line 207  xkeymap_init(void)
207          unsigned int max_keycode;          unsigned int max_keycode;
208    
209          if (strcmp(keymapname, "none"))          if (strcmp(keymapname, "none"))
210                  xkeymap_read(keymapname);          {
211                    if (xkeymap_read(keymapname))
212                            keymap_loaded = True;
213            }
214    
215          XDisplayKeycodes(display, &min_keycode, (int *) &max_keycode);          XDisplayKeycodes(display, &min_keycode, (int *) &max_keycode);
216  }  }
# Line 262  handle_special_keys(uint32 keysym, unsig Line 266  handle_special_keys(uint32 keysym, unsig
266                          }                          }
267                          else                          else
268                          {                          {
269                                  // Release Left Ctrl                                  /* Release Left Ctrl */
270                                  rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYRELEASE, 0x1d,                                  rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYRELEASE, 0x1d,
271                                                 0);                                                 0);
272                          }                          }
# Line 324  xkeymap_translate_key(uint32 keysym, uns Line 328  xkeymap_translate_key(uint32 keysym, uns
328                  return tr;                  return tr;
329          }          }
330    
331          DEBUG_KBD(("No translation for (keysym 0x%lx, %s)\n", keysym, get_ksname(keysym)));          if (keymap_loaded)
332                    error("No translation for (keysym 0x%lx, %s)\n", keysym, get_ksname(keysym));
333    
334          /* not in keymap, try to interpret the raw scancode */          /* not in keymap, try to interpret the raw scancode */
335          if ((keycode >= min_keycode) && (keycode <= 0x60))          if ((keycode >= min_keycode) && (keycode <= 0x60))

Legend:
Removed from v.203  
changed lines
  Added in v.207

  ViewVC Help
Powered by ViewVC 1.1.26