<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><div><br></div><div>ZB</div></div><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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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("\\<wbr>chapter{" .. txt .. "}")<br>
TW.target.selectRange(TW.<wbr>target.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="h5"><br>
<br>
<div class="m_-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>