mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
fix win32's missing clipboard support (bringing it back). some trickery will
be required to get ctrl-V working, but... *shrug*
This commit is contained in:
parent
c174188c0c
commit
9b8995b836
1 changed files with 26 additions and 0 deletions
|
@ -357,12 +357,38 @@ IN_StartupMouse (void)
|
||||||
IN_ActivateMouse ();
|
IN_ActivateMouse ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
in_paste_buffer_f (void)
|
||||||
|
{
|
||||||
|
HANDLE th;
|
||||||
|
char *clipText;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (OpenClipboard (NULL)) {
|
||||||
|
th = GetClipboardData (CF_TEXT);
|
||||||
|
if (th) {
|
||||||
|
clipText = GlobalLock (th);
|
||||||
|
if (clipText) {
|
||||||
|
for (i = 0; clipText[i]
|
||||||
|
&& !strchr ("\n\r\b", clipText[i]); i++) {
|
||||||
|
Key_Event (QFK_UNKNOWN, clipText[i], 1);
|
||||||
|
Key_Event (QFK_UNKNOWN, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
GlobalUnlock (th);
|
||||||
|
}
|
||||||
|
CloseClipboard ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
IN_LL_Init (void)
|
IN_LL_Init (void)
|
||||||
{
|
{
|
||||||
uiWheelMessage = RegisterWindowMessage ("MSWHEEL_ROLLMSG");
|
uiWheelMessage = RegisterWindowMessage ("MSWHEEL_ROLLMSG");
|
||||||
|
|
||||||
IN_StartupMouse ();
|
IN_StartupMouse ();
|
||||||
|
Cmd_AddCommand ("in_paste_buffer", in_paste_buffer_f,
|
||||||
|
"Paste the contents of the C&P buffer to the console");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue