177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
|
WSACleanup();
return 0;
}
}
}
back = (cfg.protocol == PROT_SSH ? &ssh_backend :
cfg.protocol == PROT_TELNET ? &telnet_backend : &raw_backend );
if (!prev) {
wndclass.style = 0;
wndclass.lpfnWndProc = WndProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = inst;
|
|
>
>
>
|
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
WSACleanup();
return 0;
}
}
}
back = (cfg.protocol == PROT_SSH ? &ssh_backend :
cfg.protocol == PROT_TELNET ? &telnet_backend :
&raw_backend);
ldisc = (cfg.ldisc_term ? &ldisc_term : &ldisc_simple);
if (!prev) {
wndclass.style = 0;
wndclass.lpfnWndProc = WndProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = inst;
|
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
|
{
unsigned char buf[20];
int len;
len = TranslateKey (wParam, lParam, buf);
if (len == -1)
return DefWindowProc (hwnd, message, wParam, lParam);
back->send (buf, len);
}
return 0;
case WM_KEYUP:
case WM_SYSKEYUP:
/*
* We handle KEYUP ourselves in order to distinghish left
* and right Alt or Control keys, which Windows won't do
|
|
|
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
|
{
unsigned char buf[20];
int len;
len = TranslateKey (wParam, lParam, buf);
if (len == -1)
return DefWindowProc (hwnd, message, wParam, lParam);
ldisc->send (buf, len);
}
return 0;
case WM_KEYUP:
case WM_SYSKEYUP:
/*
* We handle KEYUP ourselves in order to distinghish left
* and right Alt or Control keys, which Windows won't do
|
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
|
* Nevertheless, we are prepared to deal with WM_CHAR
* messages, should they crop up. So if someone wants to
* post the things to us as part of a macro manoeuvre,
* we're ready to cope.
*/
{
char c = xlat_kbd2tty((unsigned char)wParam);
back->send (&c, 1);
}
return 0;
}
return DefWindowProc (hwnd, message, wParam, lParam);
}
|
|
|
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
|
* Nevertheless, we are prepared to deal with WM_CHAR
* messages, should they crop up. So if someone wants to
* post the things to us as part of a macro manoeuvre,
* we're ready to cope.
*/
{
char c = xlat_kbd2tty((unsigned char)wParam);
ldisc->send (&c, 1);
}
return 0;
}
return DefWindowProc (hwnd, message, wParam, lParam);
}
|