VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Apologies in advance if I'm asking this question in an especially stupid way.

Has anyone written a patch to DOSBox that would let the user press a hotkey (for example, Ctrl-Alt-plus or anything else), and the host OS clipboard would flow into the DOSBox keyboard buffer, so that it could be typed into the cursor position?

I understand that this is absolutely not required by games or anything else, but it could be useful in many situations. Is there any chance that anyone has done this already? I think I understand that it would be fairly complicated to implement (for example, it would need to know how to extract text data, and nothing else from the host clipboard, and it would probably need to be able to sort out code-page inconsistencies - and the more I think about it, the more unlikely it seems that anyone has tried to add something like this).

Thanks for any information, and I understand that the answer will probably be something like "Sorry, it's not going to happen."

Reply 1 of 12, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Why not use a scripting thing?
On OS X apple script and on windows authotkey or something.
Steps on hotkey press :
- read clipboard
- put dosbox in foreground
- type clipboard

(for apple script make a global hotkey that starts the script, for authotkey make it a background process and then it will look for the hotkey itself)
This is an easy solution that should work and doesn't need any code for dosbox itself - you just need to think outside the box 😉

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 2 of 12, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:

You just need to think outside the box ;)

In other words, "think outside the DOSBox by using an external program," right? ;)

What you suggest is exactly what I'm going to do on my own machines (probably using KeyText from www.keytext.com for Windows and some homegrown AppleScript for OS X).

But I was hoping to be able to add this feature as a built-in feature to the applications I've created that run WordPerfect for DOS under DOSBox under OS X and 64-bit (or any other) Windows. I've already got a copy/paste feature implemented inside WordPerfect that exchanges text between the OS clipboard and WordPerfect, but it's kludgy and complicated, and only works inside the WordPerfect editing screen - not anywhere else in DOSBox - and it would be nice to have a simple hotkey that would do the job instantly and anywhere in DOSBox.

I'm perfectly happy to continue to live without it - but I thought I'd ask in case someone already figured out how to do this.

Reply 4 of 12, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:

There WAS some clipboard exchange patch somewhere. It's either here or on the projects patch tracker.

I looked here - that's what you meant by the patch tracker, right? -

http://sourceforge.net/tracker/?group_id=52551&atid=467234

but didn't find anything with a search for "clipboard," and a search for "paste" didn't give useful results.

I did some searching on the forum earlier, but didn't find anything that looked relevant. Probably I'm just not looking in the right place. If anyone recognizes this, I hope they'll let us know...

EDIT: Found it! It's here:

Clipboard access

Will take a look and see if I can do anything with it. Thanks for the pointer (in the general sense, not the programming sense!).

EDIT 2: Source code is here:

http://qv90.hopto.org/bb/viewtopic.php?f=3&t=15

Unfortunately, it's a version of DOSBox 0.72, making it far beyond my abilities to patch 0.74 or SVN. But there's an EXE available from the same site which I'll try out when I get to a Windows machine.

Reply 6 of 12, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:

The problem is also that this is hard to do cross platform... Have fun dissecting that ;)

I wouldn't even try! But it would be nice to have it working under even one platform...!

Reply 7 of 12, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

to have it working under even one platform

Nope that's useless.

Reply 8 of 12, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Now that I've looked at the patch, I see that, as you say, it is useless. It works at the DOS command line by copying text files to and from the clipboard. It doesn't support something like Ctrl-Alt-V to paste the OS clipboard into the current cursor position. But it's part of an interesting set of patches anyway.

Sorry to have wasted bandwidth on this one. I've already got a working, though kludgy, clipboard exchange working via WordPerfect and AutoIt or Applescript, and should have been content with that.

Reply 9 of 12, by IIGS_User

User metadata
Rank Oldbie
Rank
Oldbie

Try to merge this functionality with Boxer, which is already a re-writing, partially.

Klimawandel.

Reply 12 of 12, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:

Boxer has to be open source ;)

Obvious to me now, but I didn't realize it before - even though there's a big "SOURCE" link at the top of the Boxer web page... Oh well...