<br><br><div class="gmail_quote">On 31 January 2011 12:15, Todd Chambery <span dir="ltr"><<a href="mailto:todd.chambery@gmail.com">todd.chambery@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Just browsing the Notepad++ code, it looks like this is the method to update Scintilla's mappings:<div><br></div><div><div><font face="'courier new', monospace" size="1">void ScintillaAccelerator::updateKeys() </font></div>
<div><font face="'courier new', monospace" size="1">{</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>NppParameters *pNppParam = NppParameters::getInstance();</font></div>
<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>vector<ScintillaKeyMap> & map = pNppParam->getScintillaKeyList();</font></div>
<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>size_t mapSize = map.size();</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>size_t index;</font></div>
<div><font face="'courier new', monospace" size="1"><br></font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>for(int i = 0; i < _nrScintillas; i++)</font></div>
<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>{</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>::SendMessage(_vScintillas[i], SCI_CLEARALLCMDKEYS, 0, 0);</font></div>
<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>for(size_t j = mapSize - 1; j >= 0; j--) //reverse order, top of the list has highest priority</font></div>
<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>{<span style="white-space: pre-wrap;"> </span></font></div>
<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>ScintillaKeyMap skm = map[j];</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>if (skm.isEnabled()) </font></div>
<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>{<span style="white-space: pre-wrap;"> </span>//no validating, scintilla accepts more keys</font></div>
<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>size_t size = skm.getSize();</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>for(index = 0; index < size; index++)</font></div>
<div><font face="'courier new', monospace"><span style="white-space: pre-wrap; font-size: x-small;"> </span><b>::SendMessage(_vScintillas[i], SCI_ASSIGNCMDKEY, skm.toKeyDef(index), skm.getScintillaKeyID());</b></font></div>
<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>}</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>if (skm.getMenuCmdID() != 0) </font></div>
<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>{</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>updateMenuItemByID(skm, skm.getMenuCmdID());</font></div>
<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>}</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>if (j == 0)<span style="white-space: pre-wrap;"> </span>//j is unsigned, so default method doesnt work</font></div>
<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>break;</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>}</font></div>
<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;"> </span>}</font></div><div><font face="'courier new', monospace" size="1">}</font></div>
<div><br></div><div><div>where they send a map of Scintilla key codes to each of the buffers?</div></div></div></blockquote><div><br>Yes, Geany has a binding for sending the <font face="'courier new', monospace">SCI_ASSIGNCMDKEY message but it isn't used anywhere. All you need to do is write code to read the settings and shove them into Scintilla.<b><br>
<br></b></font> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div><div><br></div><div>Here is my Scintilla config from Notepad++:</div>
<div><br></div><div><div> <ScintillaKeys></div>
<div> <ScintKey ScintID="2302" menuCmdID="0" Ctrl="yes" Alt="yes" Shift="no" Key="73"></div><div> <NextKey Ctrl="yes" Alt="no" Shift="no" Key="73" /></div>
<div> </ScintKey></div><div> <ScintKey ScintID="2300" menuCmdID="0" Ctrl="yes" Alt="yes" Shift="no" Key="75"></div><div> <NextKey Ctrl="yes" Alt="no" Shift="no" Key="75" /></div>
<div> </ScintKey></div><div> <ScintKey ScintID="2308" menuCmdID="0" Ctrl="yes" Alt="no" Shift="no" Key="37"></div><div> <NextKey Ctrl="yes" Alt="yes" Shift="no" Key="74" /></div>
<div> </ScintKey></div><div> <ScintKey ScintID="2310" menuCmdID="0" Ctrl="yes" Alt="no" Shift="no" Key="39"></div><div> <NextKey Ctrl="yes" Alt="yes" Shift="no" Key="76" /></div>
<div> </ScintKey></div><div> <ScintKey ScintID="2307" menuCmdID="0" Ctrl="no" Alt="no" Shift="yes" Key="39"></div><div> <NextKey Ctrl="yes" Alt="no" Shift="yes" Key="76" /></div>
<div> </ScintKey></div><div> <ScintKey ScintID="2337" menuCmdID="0" Ctrl="no" Alt="no" Shift="no" Key="0" /></div><div> <ScintKey ScintID="2338" menuCmdID="0" Ctrl="yes" Alt="no" Shift="no" Key="69" /></div>
<div> <ScintKey ScintID="2304" menuCmdID="0" Ctrl="no" Alt="no" Shift="no" Key="37"></div><div> <NextKey Ctrl="yes" Alt="no" Shift="no" Key="74" /></div>
<div> </ScintKey></div><div> <ScintKey ScintID="2453" menuCmdID="0" Ctrl="no" Alt="no" Shift="no" Key="36"></div><div> <NextKey Ctrl="yes" Alt="no" Shift="no" Key="72" /></div>
<div> </ScintKey></div><div> <ScintKey ScintID="2451" menuCmdID="0" Ctrl="no" Alt="no" Shift="no" Key="35"></div><div> <NextKey Ctrl="yes" Alt="no" Shift="no" Key="186" /></div>
<div> </ScintKey></div><div> <ScintKey ScintID="2180" menuCmdID="42006" Ctrl="no" Alt="no" Shift="no" Key="46"></div><div> <NextKey Ctrl="yes" Alt="no" Shift="no" Key="68" /></div>
<div> </ScintKey></div><div> <ScintKey ScintID="2442" menuCmdID="0" Ctrl="yes" Alt="no" Shift="yes" Key="0" /></div><div> <ScintKey ScintID="2311" menuCmdID="0" Ctrl="yes" Alt="yes" Shift="yes" Key="76"></div>
<div> <NextKey Ctrl="yes" Alt="no" Shift="yes" Key="39" /></div><div> </ScintKey></div><div> <ScintKey ScintID="2301" menuCmdID="0" Ctrl="yes" Alt="no" Shift="yes" Key="75"></div>
<div> <NextKey Ctrl="yes" Alt="yes" Shift="yes" Key="75" /></div><div> </ScintKey></div><div> <ScintKey ScintID="2303" menuCmdID="0" Ctrl="yes" Alt="no" Shift="yes" Key="73"></div>
<div> <NextKey Ctrl="yes" Alt="yes" Shift="yes" Key="73" /></div><div> </ScintKey></div><div> <ScintKey ScintID="2309" menuCmdID="0" Ctrl="yes" Alt="no" Shift="yes" Key="37"></div>
<div> <NextKey Ctrl="yes" Alt="yes" Shift="yes" Key="74" /></div><div> </ScintKey></div><div> <ScintKey ScintID="2315" menuCmdID="0" Ctrl="yes" Alt="no" Shift="yes" Key="186"></div>
<div> <NextKey Ctrl="yes" Alt="yes" Shift="yes" Key="186" /></div><div> </ScintKey></div><div> <ScintKey ScintID="2332" menuCmdID="0" Ctrl="no" Alt="no" Shift="yes" Key="36"></div>
<div> <NextKey Ctrl="yes" Alt="no" Shift="yes" Key="72" /></div><div> </ScintKey></div><div> <ScintKey ScintID="2306" menuCmdID="0" Ctrl="no" Alt="no" Shift="no" Key="39"></div>
<div> <NextKey Ctrl="yes" Alt="no" Shift="no" Key="76" /></div><div> </ScintKey></div><div> <ScintKey ScintID="2312" menuCmdID="0" Ctrl="yes" Alt="no" Shift="no" Key="72"></div>
<div> <NextKey Ctrl="yes" Alt="yes" Shift="no" Key="72" /></div><div> </ScintKey></div><div> <ScintKey ScintID="2313" menuCmdID="0" Ctrl="yes" Alt="no" Shift="yes" Key="72"></div>
<div> <NextKey Ctrl="yes" Alt="yes" Shift="yes" Key="72" /></div><div> </ScintKey></div><div> <ScintKey ScintID="2314" menuCmdID="0" Ctrl="yes" Alt="no" Shift="no" Key="186"></div>
<div> <NextKey Ctrl="yes" Alt="yes" Shift="no" Key="186" /></div><div> </ScintKey></div><div> <ScintKey ScintID="2305" menuCmdID="0" Ctrl="no" Alt="no" Shift="yes" Key="37"></div>
<div> <NextKey Ctrl="yes" Alt="no" Shift="yes" Key="74" /></div><div> </ScintKey></div><div> </ScintillaKeys></div></div><div><br></div><div>
Do the ScintIDs look familiar?</div></div></div></blockquote><div><br>Just guessing what the XML means, but Ids look ok, see Geany source sciltilla/include/Scintilla.h <br><br>To be compatible with the rest of Geanys config files it would be best to use a GKeyfile format instead of Notepads XML to store the settings.<br>
<br>Cheers<br>Lex<br><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div><div><div></div><div class="h5">
<div><br></div><div><br></div><div class="gmail_quote">
On Sat, Jan 29, 2011 at 2:32 PM, Lex Trotman <span dir="ltr"><<a href="mailto:elextr@gmail.com" target="_blank">elextr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br><br><div class="gmail_quote"><div><div></div><div>On 30 January 2011 01:38, Todd Chambery <span dir="ltr"><<a href="mailto:todd.chambery@gmail.com" target="_blank">todd.chambery@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi all, <div><br></div><div>Is there a mechanism for customizing the cursor movement keybindings in Geany?</div><div><div><br></div><div>I'm a happy Notepad++ user on WIndows, largely because it accommodates my "inverted T" editor navigation keybindings:<img src=""></div>
<div><br></div><div>(<a href="http://chambery.subfire.org/images/keybindings-simplified.png" target="_blank">http://chambery.subfire.org/images/keybindings-simplified.png</a>)</div><div><br></div><div>Notepad++ uses Scintilla underneath, maybe I can port these over?</div>
</div></blockquote></div></div><div><br>Hi Todd,<br><br>You are correct that these keybindings are handled by Scintilla. Scintilla can have the keybindings configured, but Geany currently does not have the ability to do it. It could be a useful addition but someones got to do it (tm) patches welcome.<br>
<br>Cheers<br>Lex<br><br>PS doesn't have to be a GUI configurator, just loading a file would do<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<div><br></div><div>Thanks,</div><div>Todd</div></div>
<br>_______________________________________________<br>
Geany mailing list<br>
<a href="mailto:Geany@uvena.de" target="_blank">Geany@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
Geany mailing list<br>
<a href="mailto:Geany@uvena.de" target="_blank">Geany@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a><br>
<br></blockquote></div><br></div></div></div>
</div>
<br>_______________________________________________<br>
Geany mailing list<br>
<a href="mailto:Geany@uvena.de">Geany@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a><br>
<br></blockquote></div><br>