Opened 6 years ago

Last modified 6 years ago

#133 assigned enhancement

Add support for clipboard paste (or even copy) in Oni Dev console

Reported by: s10k Owned by: Iritscen
Priority: minor Component: Daodan/Win
Keywords: Cc:

Description (last modified by s10k)

As funktotheface mentioned on the discord server it would be very nice to have clipboard paste ability on the Oni Dev console.

It will make testing commands much easier without having to type them manually.

Accordingly to gumby it shouldn't be that hard to implement.

From what I understood it should work like this on Windows:

You register the Oni Window in the Windows clipboard:

https://docs.microsoft.com/en-us/windows/desktop/dataxchg/using-the-clipboard

(clipboard viewer window method should be preferred for Windows 2000 backwards comparability).

Once oni window is registered on clipboard viewer, we can receive a notification everytime a user does ctrl + v on oni Window.

If the developer mode console is active, we should read the memory on clipboard and if it is valid ASCII text, we should copy it to the address where Oni Dev mode current command is.

If possible it would also be nice to have the copy ability, so if the user trigger ctrl + c when oni dev mode is active (with a command highlight), the current command would be copied for the windows clipboard.

Change History (3)

comment:1 Changed 6 years ago by s10k

  • Description modified (diff)
  • Summary changed from Add support for clipboard past (or even copy) in Oni Dev console to Add support for clipboard paste (or even copy) in Oni Dev console

comment:2 Changed 6 years ago by Alloc

  • Owner changed from Alloc to Iritscen
  • Status changed from new to assigned

Sounds like a good idea. Mr. I, do you see that as feasible?

comment:3 Changed 6 years ago by Iritscen

I found it easy to add the Paste feature to Zukai's GUI, in Oni for the Mac. You're already hooking LIrActionBuffer_Add(), so you just need to put some code in there to look for "Ctrl" and "v" being pressed together, then plug in whatever the API is in Windows that gets the contents of the clipboard.

Note: See TracTickets for help on using tickets.