Common searches

First post, by emendelson

User metadata
Rank Oldbie

Here is a patch that adds (Windows-only) clipboard pasting to current SVN (r3981, updated today). The code is NOT my work; I wouldn't know how to begin writing something like this. All I did was finally figure out how to make a patch that applies this feature to SVN. Everything in it is taken from the code for dbDOS 3.0, a commercial offshoot of DOSBox, written by a contract programmer whose name seems to be Olivier Hamel. I posted full source files a couple of years ago, but I didn't know how to create a simple patch back then.

The patch only affects sdlmain.cpp. As you can see from the code, when applied to current SVN, it enables the keystroke Ctrl-Alt-F4 to paste the contents of the Windows clipboard into the DOSBox window; that keystroke is of course easy to change. This is not limited to pasting 256 characters, as in Wengier Wu's clipboard implementation, but it does NOT support copying from the DOSBox window, as Wengier Wu's implementation does. I haven't tried combining Wengier's copy function with this paste function, but presumably they could work together.

I hope I've put together the diff correctly. I don't actually know what I'm doing, but the code certainly works and I hope the diff is useful.


  • Filename
    File size
    12.59 KiB
    File license
    Fair use/fair dealing exception

Reply 1 of 2, by Wengier

User metadata
Rank Member

The 256 character limit of my mouse copy/paste support is the limitation of 256KEYS. It is easy to expand the limit by using e.g. keybuf.com instead of 256keys.com. For example, "KEYBUF 1024" will expand the character limit to 1024. You can give bigger value to further expand the character limit as well.

EDIT: I have uploaded the updated DOSBox SVN-lfn Windows binaries, which now includes keybuf.com instead of 256keys.com for larger keyboard buffer.

Reply 2 of 2, by Wengier

User metadata
Rank Member

The latest patch for the mouse copy and paste support does not have any limitations for pasting text any more, so the original dbDOS method for doing this seems to be already obsolete.

See the mouse copy and paste support thread for more information:

Mouse copy/paste support