--- sourceforge.net/trunk/rdesktop/rdesktop.c 2002/07/18 16:38:31 64 +++ sourceforge.net/trunk/rdesktop/rdesktop.c 2002/07/30 01:57:39 81 @@ -32,7 +32,7 @@ char username[16]; char hostname[16]; char keymapname[16]; -int keylayout; +int keylayout = 0x409; /* Defaults to US keyboard layout */ int width; int height; int tcp_port_rdp = TCP_PORT_RDP; @@ -43,6 +43,7 @@ BOOL encryption = True; BOOL desktop_save = True; BOOL fullscreen = False; +BOOL grab_keyboard = True; /* Display usage information */ static void @@ -55,14 +56,15 @@ printf(" -c: working directory\n"); printf(" -p: password (autologon)\n"); printf(" -n: client hostname\n"); - printf(" -k: keyboard layout\n"); + printf(" -k: keyboard layout on terminal server (us,sv,gr etc.)\n"); printf(" -g: desktop geometry (WxH)\n"); printf(" -f: full-screen mode\n"); printf(" -b: force bitmap updates\n"); printf(" -e: disable encryption (French TS)\n"); printf(" -m: do not send motion events\n"); printf(" -l: do not request licence\n"); - printf(" -t: rdp tcp port\n\n"); + printf(" -t: rdp tcp port\n"); + printf(" -K: keep window manager key bindings\n"); } /* Client program */ @@ -89,7 +91,7 @@ domain[0] = password[0] = shell[0] = directory[0] = 0; strcpy(keymapname, "us"); - while ((c = getopt(argc, argv, "u:d:s:c:p:n:k:g:t:fbemlh?")) != -1) + while ((c = getopt(argc, argv, "u:d:s:c:p:n:k:g:t:fbemlKh?")) != -1) { switch (c) { @@ -159,6 +161,10 @@ tcp_port_rdp = strtol(optarg, NULL, 10); break; + case 'K': + grab_keyboard = False; + break; + case 'h': case '?': default: @@ -222,6 +228,10 @@ strcpy(title, "rdesktop - "); strncat(title, server, sizeof(title) - sizeof("rdesktop - ")); + xkeymap_init1(); + if(!ui_init()) + return 1; + if (!rdp_connect(server, flags, domain, password, shell, directory)) return 1;