Is there any way to send a startup key-stroke to an application running in wine?












0















Long story short, I'm trying to access a special window in Synthesia which is only displayed if you execute the application using Shift+Click. The problem is that I can't figure out how to reproduce this on Linux, while running the app under wine. I thought it may be a command line thing, but I couldn't find a command which does it either.



That leaves me with this, is it even possible? If so, how?










share|improve this question























  • Try to disable compiz: In System > Preferences > Appearance, select None in the visual effects tab.

    – harrymc
    Jan 2 at 8:55











  • Done, I don't see how this helps though.

    – Frontear
    Jan 2 at 16:41











  • Explorer doesn't give Shift any special treatment while executing a file. It simply runs the executable as a command, otherwise how consoles and other applications can execute it? The application can't know whether you've pressed the Shift key or not. It can only do that after it has started

    – phuclv
    Jan 6 at 8:56











  • Exactly that, so there must be some way to emulate that on Wine, no? A simple Shift+Click on any DE doesn't work out here.

    – Frontear
    Jan 6 at 15:20











  • As @phuclv says, the Shift key isn't special to how the application is started, but is special to the application once it has started... i.e: part of the application's startup code will look at the state of the Shift key.

    – Attie
    Jan 8 at 16:45


















0















Long story short, I'm trying to access a special window in Synthesia which is only displayed if you execute the application using Shift+Click. The problem is that I can't figure out how to reproduce this on Linux, while running the app under wine. I thought it may be a command line thing, but I couldn't find a command which does it either.



That leaves me with this, is it even possible? If so, how?










share|improve this question























  • Try to disable compiz: In System > Preferences > Appearance, select None in the visual effects tab.

    – harrymc
    Jan 2 at 8:55











  • Done, I don't see how this helps though.

    – Frontear
    Jan 2 at 16:41











  • Explorer doesn't give Shift any special treatment while executing a file. It simply runs the executable as a command, otherwise how consoles and other applications can execute it? The application can't know whether you've pressed the Shift key or not. It can only do that after it has started

    – phuclv
    Jan 6 at 8:56











  • Exactly that, so there must be some way to emulate that on Wine, no? A simple Shift+Click on any DE doesn't work out here.

    – Frontear
    Jan 6 at 15:20











  • As @phuclv says, the Shift key isn't special to how the application is started, but is special to the application once it has started... i.e: part of the application's startup code will look at the state of the Shift key.

    – Attie
    Jan 8 at 16:45
















0












0








0


0






Long story short, I'm trying to access a special window in Synthesia which is only displayed if you execute the application using Shift+Click. The problem is that I can't figure out how to reproduce this on Linux, while running the app under wine. I thought it may be a command line thing, but I couldn't find a command which does it either.



That leaves me with this, is it even possible? If so, how?










share|improve this question














Long story short, I'm trying to access a special window in Synthesia which is only displayed if you execute the application using Shift+Click. The problem is that I can't figure out how to reproduce this on Linux, while running the app under wine. I thought it may be a command line thing, but I couldn't find a command which does it either.



That leaves me with this, is it even possible? If so, how?







linux wine






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 27 '18 at 22:15









FrontearFrontear

14




14













  • Try to disable compiz: In System > Preferences > Appearance, select None in the visual effects tab.

    – harrymc
    Jan 2 at 8:55











  • Done, I don't see how this helps though.

    – Frontear
    Jan 2 at 16:41











  • Explorer doesn't give Shift any special treatment while executing a file. It simply runs the executable as a command, otherwise how consoles and other applications can execute it? The application can't know whether you've pressed the Shift key or not. It can only do that after it has started

    – phuclv
    Jan 6 at 8:56











  • Exactly that, so there must be some way to emulate that on Wine, no? A simple Shift+Click on any DE doesn't work out here.

    – Frontear
    Jan 6 at 15:20











  • As @phuclv says, the Shift key isn't special to how the application is started, but is special to the application once it has started... i.e: part of the application's startup code will look at the state of the Shift key.

    – Attie
    Jan 8 at 16:45





















  • Try to disable compiz: In System > Preferences > Appearance, select None in the visual effects tab.

    – harrymc
    Jan 2 at 8:55











  • Done, I don't see how this helps though.

    – Frontear
    Jan 2 at 16:41











  • Explorer doesn't give Shift any special treatment while executing a file. It simply runs the executable as a command, otherwise how consoles and other applications can execute it? The application can't know whether you've pressed the Shift key or not. It can only do that after it has started

    – phuclv
    Jan 6 at 8:56











  • Exactly that, so there must be some way to emulate that on Wine, no? A simple Shift+Click on any DE doesn't work out here.

    – Frontear
    Jan 6 at 15:20











  • As @phuclv says, the Shift key isn't special to how the application is started, but is special to the application once it has started... i.e: part of the application's startup code will look at the state of the Shift key.

    – Attie
    Jan 8 at 16:45



















Try to disable compiz: In System > Preferences > Appearance, select None in the visual effects tab.

– harrymc
Jan 2 at 8:55





Try to disable compiz: In System > Preferences > Appearance, select None in the visual effects tab.

– harrymc
Jan 2 at 8:55













Done, I don't see how this helps though.

– Frontear
Jan 2 at 16:41





Done, I don't see how this helps though.

– Frontear
Jan 2 at 16:41













Explorer doesn't give Shift any special treatment while executing a file. It simply runs the executable as a command, otherwise how consoles and other applications can execute it? The application can't know whether you've pressed the Shift key or not. It can only do that after it has started

– phuclv
Jan 6 at 8:56





Explorer doesn't give Shift any special treatment while executing a file. It simply runs the executable as a command, otherwise how consoles and other applications can execute it? The application can't know whether you've pressed the Shift key or not. It can only do that after it has started

– phuclv
Jan 6 at 8:56













Exactly that, so there must be some way to emulate that on Wine, no? A simple Shift+Click on any DE doesn't work out here.

– Frontear
Jan 6 at 15:20





Exactly that, so there must be some way to emulate that on Wine, no? A simple Shift+Click on any DE doesn't work out here.

– Frontear
Jan 6 at 15:20













As @phuclv says, the Shift key isn't special to how the application is started, but is special to the application once it has started... i.e: part of the application's startup code will look at the state of the Shift key.

– Attie
Jan 8 at 16:45







As @phuclv says, the Shift key isn't special to how the application is started, but is special to the application once it has started... i.e: part of the application's startup code will look at the state of the Shift key.

– Attie
Jan 8 at 16:45












2 Answers
2






active

oldest

votes


















0





+100









This program uses GetKeyState API to detect shift key as follows:



.text:0040D575                 call    ds:GetKeyState
.text:0040D57B mov ecx, 8000h
.text:0040D580 test cx, ax
.text:0040D583 jnz loc_40E21F ; jumps to special config dialog show




  1. Generate bash script in Synthesia directory with favorite name (mine: runme) and fill with following lines:



    #!/bin/bash
    wine Synthesia.exe


  2. Change its attribute to runable with chmod +x rumne and ensure you can click and run instantly bash scripts. I mean run bash scripts without asking dialog! use this answer



  3. HOLD Shift KEY and click/double click to run runme. the programs runs normaly! now close it but DO NOT RELASE Shift KEY. Do again and click/double click to run runme to show special config dialog.



    show me!








share|improve this answer


























  • Instead of #2, couldn't you press and hold shift when clicking the "Run" button?

    – Attie
    Jan 8 at 16:43











  • Bonus points for a wrapper script that does a binary patch and accepts a flag to show the normal / config window.

    – Attie
    Jan 8 at 16:47











  • I tested clicking run button in ask dialog while holding shift but did not work! I can do binary patch but question was how to send startup key stroke in wine not how to run this app in config mode. if you need let me know.

    – arman
    Jan 8 at 17:06













  • It doesn't seem to let me run the script while holding down shift. I'm running KDE.

    – Frontear
    Jan 9 at 0:48






  • 1





    I've found a different way to run it, I simply called Explorer.exe under wine, then shift + click from there.

    – Frontear
    Jan 9 at 1:22



















0














Another method that can be followed is to run Explorer.exe under wine, then perform the Shift+Click operation. Unlike the above method, it does not rely on a specific setting to be changed or a script






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1388249%2fis-there-any-way-to-send-a-startup-key-stroke-to-an-application-running-in-wine%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0





    +100









    This program uses GetKeyState API to detect shift key as follows:



    .text:0040D575                 call    ds:GetKeyState
    .text:0040D57B mov ecx, 8000h
    .text:0040D580 test cx, ax
    .text:0040D583 jnz loc_40E21F ; jumps to special config dialog show




    1. Generate bash script in Synthesia directory with favorite name (mine: runme) and fill with following lines:



      #!/bin/bash
      wine Synthesia.exe


    2. Change its attribute to runable with chmod +x rumne and ensure you can click and run instantly bash scripts. I mean run bash scripts without asking dialog! use this answer



    3. HOLD Shift KEY and click/double click to run runme. the programs runs normaly! now close it but DO NOT RELASE Shift KEY. Do again and click/double click to run runme to show special config dialog.



      show me!








    share|improve this answer


























    • Instead of #2, couldn't you press and hold shift when clicking the "Run" button?

      – Attie
      Jan 8 at 16:43











    • Bonus points for a wrapper script that does a binary patch and accepts a flag to show the normal / config window.

      – Attie
      Jan 8 at 16:47











    • I tested clicking run button in ask dialog while holding shift but did not work! I can do binary patch but question was how to send startup key stroke in wine not how to run this app in config mode. if you need let me know.

      – arman
      Jan 8 at 17:06













    • It doesn't seem to let me run the script while holding down shift. I'm running KDE.

      – Frontear
      Jan 9 at 0:48






    • 1





      I've found a different way to run it, I simply called Explorer.exe under wine, then shift + click from there.

      – Frontear
      Jan 9 at 1:22
















    0





    +100









    This program uses GetKeyState API to detect shift key as follows:



    .text:0040D575                 call    ds:GetKeyState
    .text:0040D57B mov ecx, 8000h
    .text:0040D580 test cx, ax
    .text:0040D583 jnz loc_40E21F ; jumps to special config dialog show




    1. Generate bash script in Synthesia directory with favorite name (mine: runme) and fill with following lines:



      #!/bin/bash
      wine Synthesia.exe


    2. Change its attribute to runable with chmod +x rumne and ensure you can click and run instantly bash scripts. I mean run bash scripts without asking dialog! use this answer



    3. HOLD Shift KEY and click/double click to run runme. the programs runs normaly! now close it but DO NOT RELASE Shift KEY. Do again and click/double click to run runme to show special config dialog.



      show me!








    share|improve this answer


























    • Instead of #2, couldn't you press and hold shift when clicking the "Run" button?

      – Attie
      Jan 8 at 16:43











    • Bonus points for a wrapper script that does a binary patch and accepts a flag to show the normal / config window.

      – Attie
      Jan 8 at 16:47











    • I tested clicking run button in ask dialog while holding shift but did not work! I can do binary patch but question was how to send startup key stroke in wine not how to run this app in config mode. if you need let me know.

      – arman
      Jan 8 at 17:06













    • It doesn't seem to let me run the script while holding down shift. I'm running KDE.

      – Frontear
      Jan 9 at 0:48






    • 1





      I've found a different way to run it, I simply called Explorer.exe under wine, then shift + click from there.

      – Frontear
      Jan 9 at 1:22














    0





    +100







    0





    +100



    0




    +100





    This program uses GetKeyState API to detect shift key as follows:



    .text:0040D575                 call    ds:GetKeyState
    .text:0040D57B mov ecx, 8000h
    .text:0040D580 test cx, ax
    .text:0040D583 jnz loc_40E21F ; jumps to special config dialog show




    1. Generate bash script in Synthesia directory with favorite name (mine: runme) and fill with following lines:



      #!/bin/bash
      wine Synthesia.exe


    2. Change its attribute to runable with chmod +x rumne and ensure you can click and run instantly bash scripts. I mean run bash scripts without asking dialog! use this answer



    3. HOLD Shift KEY and click/double click to run runme. the programs runs normaly! now close it but DO NOT RELASE Shift KEY. Do again and click/double click to run runme to show special config dialog.



      show me!








    share|improve this answer















    This program uses GetKeyState API to detect shift key as follows:



    .text:0040D575                 call    ds:GetKeyState
    .text:0040D57B mov ecx, 8000h
    .text:0040D580 test cx, ax
    .text:0040D583 jnz loc_40E21F ; jumps to special config dialog show




    1. Generate bash script in Synthesia directory with favorite name (mine: runme) and fill with following lines:



      #!/bin/bash
      wine Synthesia.exe


    2. Change its attribute to runable with chmod +x rumne and ensure you can click and run instantly bash scripts. I mean run bash scripts without asking dialog! use this answer



    3. HOLD Shift KEY and click/double click to run runme. the programs runs normaly! now close it but DO NOT RELASE Shift KEY. Do again and click/double click to run runme to show special config dialog.



      show me!









    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jan 8 at 14:47









    phuclv

    9,06463889




    9,06463889










    answered Jan 8 at 14:44









    armanarman

    101




    101













    • Instead of #2, couldn't you press and hold shift when clicking the "Run" button?

      – Attie
      Jan 8 at 16:43











    • Bonus points for a wrapper script that does a binary patch and accepts a flag to show the normal / config window.

      – Attie
      Jan 8 at 16:47











    • I tested clicking run button in ask dialog while holding shift but did not work! I can do binary patch but question was how to send startup key stroke in wine not how to run this app in config mode. if you need let me know.

      – arman
      Jan 8 at 17:06













    • It doesn't seem to let me run the script while holding down shift. I'm running KDE.

      – Frontear
      Jan 9 at 0:48






    • 1





      I've found a different way to run it, I simply called Explorer.exe under wine, then shift + click from there.

      – Frontear
      Jan 9 at 1:22



















    • Instead of #2, couldn't you press and hold shift when clicking the "Run" button?

      – Attie
      Jan 8 at 16:43











    • Bonus points for a wrapper script that does a binary patch and accepts a flag to show the normal / config window.

      – Attie
      Jan 8 at 16:47











    • I tested clicking run button in ask dialog while holding shift but did not work! I can do binary patch but question was how to send startup key stroke in wine not how to run this app in config mode. if you need let me know.

      – arman
      Jan 8 at 17:06













    • It doesn't seem to let me run the script while holding down shift. I'm running KDE.

      – Frontear
      Jan 9 at 0:48






    • 1





      I've found a different way to run it, I simply called Explorer.exe under wine, then shift + click from there.

      – Frontear
      Jan 9 at 1:22

















    Instead of #2, couldn't you press and hold shift when clicking the "Run" button?

    – Attie
    Jan 8 at 16:43





    Instead of #2, couldn't you press and hold shift when clicking the "Run" button?

    – Attie
    Jan 8 at 16:43













    Bonus points for a wrapper script that does a binary patch and accepts a flag to show the normal / config window.

    – Attie
    Jan 8 at 16:47





    Bonus points for a wrapper script that does a binary patch and accepts a flag to show the normal / config window.

    – Attie
    Jan 8 at 16:47













    I tested clicking run button in ask dialog while holding shift but did not work! I can do binary patch but question was how to send startup key stroke in wine not how to run this app in config mode. if you need let me know.

    – arman
    Jan 8 at 17:06







    I tested clicking run button in ask dialog while holding shift but did not work! I can do binary patch but question was how to send startup key stroke in wine not how to run this app in config mode. if you need let me know.

    – arman
    Jan 8 at 17:06















    It doesn't seem to let me run the script while holding down shift. I'm running KDE.

    – Frontear
    Jan 9 at 0:48





    It doesn't seem to let me run the script while holding down shift. I'm running KDE.

    – Frontear
    Jan 9 at 0:48




    1




    1





    I've found a different way to run it, I simply called Explorer.exe under wine, then shift + click from there.

    – Frontear
    Jan 9 at 1:22





    I've found a different way to run it, I simply called Explorer.exe under wine, then shift + click from there.

    – Frontear
    Jan 9 at 1:22













    0














    Another method that can be followed is to run Explorer.exe under wine, then perform the Shift+Click operation. Unlike the above method, it does not rely on a specific setting to be changed or a script






    share|improve this answer




























      0














      Another method that can be followed is to run Explorer.exe under wine, then perform the Shift+Click operation. Unlike the above method, it does not rely on a specific setting to be changed or a script






      share|improve this answer


























        0












        0








        0







        Another method that can be followed is to run Explorer.exe under wine, then perform the Shift+Click operation. Unlike the above method, it does not rely on a specific setting to be changed or a script






        share|improve this answer













        Another method that can be followed is to run Explorer.exe under wine, then perform the Shift+Click operation. Unlike the above method, it does not rely on a specific setting to be changed or a script







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 9 at 17:28









        FrontearFrontear

        14




        14






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1388249%2fis-there-any-way-to-send-a-startup-key-stroke-to-an-application-running-in-wine%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Сан-Квентин

            Алькесар

            Josef Freinademetz