/[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 193 by matthewc, Tue Sep 24 11:14:46 2002 UTC revision 199 by astrand, Wed Sep 25 11:17:59 2002 UTC
# Line 218  handle_special_keys(uint32 keysym, uint3 Line 218  handle_special_keys(uint32 keysym, uint3
218  {  {
219          switch (keysym)          switch (keysym)
220          {          {
221                  case XK_Break:  /* toggle full screen */                  case XK_Break:
222                          if (get_key_state(XK_Alt_L) || get_key_state(XK_Alt_R))                          if (get_key_state(XK_Alt_L) || get_key_state(XK_Alt_R))
223                          {                          {
224                                    /* toggle full screen */
225                                  if (pressed)                                  if (pressed)
226                                          xwin_toggle_fullscreen();                                          xwin_toggle_fullscreen();
227                                  return True;  
228                            }
229                            else
230                            {
231                                    /* Send Break sequence E0 46 E0 C6 */
232                                    if (pressed)
233                                    {
234                                            rdp_send_scancode(ev_time, RDP_KEYPRESS,
235                                                              (SCANCODE_EXTENDED | 0x46));
236                                            rdp_send_scancode(ev_time, RDP_KEYPRESS,
237                                                              (SCANCODE_EXTENDED | 0xc6));
238                                    }
239                                    /* No break sequence */
240                          }                          }
241    
242                            return True;
243                            break;
244    
245                    case XK_Pause:
246                            /* According to MS Keyboard Scan Code
247                               Specification, pressing Pause should result
248                               in E1 1D 45 E1 9D C5. I'm not exactly sure
249                               of how this is supposed to be sent via
250                               RDP. The code below seems to work, but with
251                               the side effect that Left Ctrl stays
252                               down. Therefore, we release it when Pause
253                               is released. */
254                            if (pressed)
255                            {
256                                    rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYPRESS, 0xe1, 0);
257                                    rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYPRESS, 0x1d, 0);
258                                    rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYPRESS, 0x45, 0);
259                                    rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYPRESS, 0xe1, 0);
260                                    rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYPRESS, 0x9d, 0);
261                                    rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYPRESS, 0xc5, 0);
262                            }
263                            else
264                            {
265                                    // Release Left Ctrl
266                                    rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYRELEASE, 0x1d,
267                                                   0);
268                            }
269    
270                            return True;
271                          break;                          break;
272    
273                  case XK_Meta_L: /* Windows keys */                  case XK_Meta_L: /* Windows keys */
# Line 277  xkeymap_translate_key(uint32 keysym, uns Line 320  xkeymap_translate_key(uint32 keysym, uns
320          if (tr.scancode != 0)          if (tr.scancode != 0)
321          {          {
322                  DEBUG_KBD(("Found key translation, scancode=0x%x, modifiers=0x%x\n",                  DEBUG_KBD(("Found key translation, scancode=0x%x, modifiers=0x%x\n",
323                            tr.scancode, tr.modifiers));                             tr.scancode, tr.modifiers));
324                  return tr;                  return tr;
325          }          }
326    

Legend:
Removed from v.193  
changed lines
  Added in v.199

  ViewVC Help
Powered by ViewVC 1.1.26