<div dir="ltr"><div>Thanks Mark. I have tried reading though that manual but am puzzled as to how to use that to have some key sequence lead the file to be saved: like where would I add in the parameters. Sorry like I said I really have little programming skill :(</div><div><br></div><div>And as an aside yes you are correct in what I am trying for: in Microsoft Windows, the standard key sequence for:</div><div>saving files is Alt <and then> F <and then> S;</div><div>or to undo what was just written is Alt <and then> E <and then> U</div><div>Essentially the Alt activates the pull down menu and then the other keys navigate the pulldown. So if I can create a shortcut or get a script to do this, it will be like virtually every other program I use and will speed my editing. I am guessing others in the Windows world would also benefit from this, so if I figure out a solution I will be sure to post it here!</div><div><br></div><div>And finally not sure if there is someone on the mail list who is more familiar with the shortcuts. I am guessing there is a way to do what I want with the shortcuts.ini file but it is not well documented (what I know I pulled from manual, <a href="http://formal.korea.ac.kr/~jlee/lectures/cnce150/read/TeXworks-manual.pdf">http://formal.korea.ac.kr/~jlee/lectures/cnce150/read/TeXworks-manual.pdf</a>, Section A.2)</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 15, 2017 at 7:28 PM, Mark Yagnatinsky <span dir="ltr"><<a href="mailto:markyag@gmail.com" target="_blank">markyag@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>First off, I never knew about shortcuts.ini before; this is a great feature and needs to be made more discoverable.  I suggest, at a minimum, that a fresh TeXworks installation creates an empty shortcuts.ini file so that someone might wonder what it's for.  Maybe someone should file a feature request.  (Maybe me??)</div><div><br></div><div>Second, it seems a bit silly that the syntax for shortcuts in shortcuts.ini does not match the syntax for shortcuts for running scripts; surely those should be identical.  Sounds like another feature request.</div><div><br></div><div>Third: in what world is "Alt + F + S" a familiar keyboard shortcut for saving a file!?!  The only thing I'm aware of that comes even close is "Alt + F, S", which simply opens the file menu, and then selects the save option.  Unfortunately, this doesn't seem to work in TeXworks, since it seems that none of the menus on the menu bar have an accelerator key defined, so Alt + F fails to open the file menu, and even if it did, "S" does not activate save.  Yet another missing feature.</div><div><br></div><div>Finally, I'm no expert in the TeXworks scripting API, and have written precisely zero working scripts, but this seems to do what you need:</div><div><a href="http://twscript.paulanorman.info/docs/html/TexWorksQtScripting.html?save.html" target="_blank">http://twscript.paulanorman.<wbr>info/docs/html/<wbr>TexWorksQtScripting.html?save.<wbr>html</a></div><div><span class="m_-3869926020280496228gmail-rvts8">In other words, the script is a one line: TW.target.save();</span></div><div><span class="m_-3869926020280496228gmail-rvts8">Disclaimer: I have not tried it.  I personally just use Ctrl + S, to save.</span></div><div><span class="m_-3869926020280496228gmail-rvts8">(Actually, this is not true.  What I actually do is Ctrl + T to typeset, and rely on the implicit save just before typesetting.)</span></div><div><span class="m_-3869926020280496228gmail-rvts8"><br></span></div><div><span class="m_-3869926020280496228gmail-rvts8">Hope some of this helps.</span></div><div><span class="m_-3869926020280496228gmail-rvts8">If not, ask again.</span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 15, 2017 at 12:28 AM, Z Br <span dir="ltr"><<a href="mailto:breigzach@gmail.com" target="_blank">breigzach@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div>Thanks Alain!</div><div><br></div><div>Unfortunately I am not much of a programmer and so I am unsure how to modify the script you posted to get the action I had asked about. Could you give a bit more direction, or if someone else knows if this is possible with the short cuts file that would be great too.</div><span class="m_-3869926020280496228HOEnZb"><font color="#888888"><div><br></div><div>ZB</div></font></span></div><div class="m_-3869926020280496228HOEnZb"><div class="m_-3869926020280496228h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 14, 2017 at 1:32 PM, Alain Delmotte <span dir="ltr"><<a href="mailto:alain.delmotte@leliseron.org" target="_blank">alain.delmotte@leliseron.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p><font face="Comic Sans MS">Hi,</font></p>
    <p><font face="Comic Sans MS">I don't think that it is possible with
        a shortcut*, but you could have a script to do that, like this
        one:</font></p>
    <p><font face="Comic Sans MS">==============================<wbr>==
        chapter.lua<br>
        --[[TeXworksScript<br>
        Title: d: chapter \c&hapter<br>
        Description: Encloses the current selection in \chapter{}<br>
        Author: Alain Delmotte from Stefan Löffler & Jonathan Kew<br>
        Version: 0.1<br>
        Date: 2011-11-01<br>
        Script-Type: standalone<br>
        Context: TeXDocument<br>
        Shortcut: Alt+W, Alt+&<br>
        ]]<br>
        <br>
        txt = TW.target.selection<br>
        if (txt == nil) then txt = "" end<br>
        TW.target.insertText("\\chapte<wbr>r{" .. txt .. "}")<br>
        TW.target.selectRange(TW.targe<wbr>t.selectionStart - string.len(txt)
        - 1, string.len(txt))<br>
        ============================</font></p>
    <p><font face="Comic Sans MS">To create a \chapter{xyz} instruction
        I type "xyz", select this and type Alt+W& (the key where is
        "1", but on my belgian keyboard it has & as lower case). If
        I selct nothing I just have \chapter{}.</font></p>
    <p><font face="Comic Sans MS">You have to put the script file in the
        scripts folder.<br>
      </font></p>
    <p><font face="Comic Sans MS">Regards,</font></p>
    <p><font face="Comic Sans MS">Alain</font><br>
    </p>
    * to be confirmed by the specialists<div><div class="m_-3869926020280496228m_-3308744716939970842h5"><br>
    <br>
    <div class="m_-3869926020280496228m_-3308744716939970842m_-2572331746702670481moz-cite-prefix">Le 14/03/2017 à 14:15, Z Br a écrit :<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>Hi:</div>
        <div><br>
        </div>
        <div>I am using a shortcuts.ini file to create some custom
          shortcuts. I would like to have shortcuts which involve
          multiple letters, e.g. the familiar Alt+F+S to save the file.
          But when I include lines like this in shortcuts.ini,</div>
        <div>actionSave = Alt+F+S</div>
        <div>they do not work (literally nothing happens). Shortcuts
          with just one letter like</div>
        <div>actionSave = Alt+S</div>
        <div>do work.</div>
        <div><br>
        </div>
        <div>Is there a way to create shortcuts with multiple letters? </div>
        <div><br>
        </div>
        <div>Regards,</div>
        <div>Zach<br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>My setup:</div>
        <div>Win7 Enterprise x64</div>
        <div>TexWorks 0.6.1</div>
      </div>
    </blockquote>
    <br>
  
<br><br>
</div></div><hr style="border:currentColor;width:99%;height:1px;color:rgb(144,144,144);background-color:rgb(176,176,176)">
<table style="border:currentColor;border-collapse:collapse">
        <tbody><tr>
                <td style="padding:0px 15px 0px 8px;border:currentColor">
                        <a href="https://www.avast.com/antivirus" target="_blank">
                                <img alt="Avast logo" src="http://static.avast.com/emails/avast-mail-stamp.png" border="0">
                        </a>
                </td>
                <td>
                        <p style="color:rgb(61,77,90);font-family:"Calibri","Verdana","Arial","Helvetica";font-size:12pt">
                                L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
                                <br><a href="https://www.avast.com/antivirus" target="_blank">www.avast.com</a>
                        </p>
                </td>
        </tr>
</tbody></table>
<br>
</div>


</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>