GMS 2 What are my clipboard options for Linux + Mac?

Discussion in 'Programming' started by ragingdemonz, Sep 10, 2019.

  1. ragingdemonz

    ragingdemonz Member

    Jun 28, 2016
    Hi reading the manual I realized the Clipboard stuff only works for windows target...
    How should i work around clipboard options for Mac and Linux??

    Is there some way to copy and paste stuff onto clipboard for Mac + linux targets?
  2. Yal

    Yal GMC Memer GMC Elder

    Jun 20, 2016
    I work as a Linux developer, and there actually isn't a system-wide clipboard! The window manager system (called "X") does a good job at hiding this fact to you, but if you try to copypaste text between terminals using Ctrl+K and Ctrl+Y you'll notice each terminal also has its own clipboard. Ctrl+Insert and Shift+Insert works in most programs, but not if you switch sessions to a "non-virtual" terminal...

    Mac being an Unix system below all the DRM, probably has a similar situation.

    With that said, you could use an extension to call functions from a C++ - compiled DLL (except they're called ".so" files in Linux) to access the X clipboard:

    All of the suggestions in the accepted answer to that question are programs, so probably most easily available as pre-compiled binaries, but if you can't find / be bothered to use their source, you could have the program as an included file, then also include a super simple "DLL" that just invokes the included-file version of the program and returns its output to the calling GameMaker program. (Just keep an eye on the licensing when including other people's programs!)

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice