Todd,<br><br>Couple of comments below that may be helpful<br><br><div class="gmail_quote">On 9 February 2011 22:48, 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;"><div>A newbie question:  How do I print out the strings?</div><div><br></div>Copying some methods within the geany code, the below builds:<div>
<font size="1"><br>

</font></div><div><div><font size="1"><br></font></div><div><div><font face="'courier new', monospace" size="1">[keys]</font></div><div><font face="'courier new', monospace" size="1">line_down=C+K CA+K</font></div>


<div><font face="'courier new', monospace" size="1">line_up=C+I CA+I</font></div></div></div></blockquote><div><br>The string list separator is semicolon not space<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><br></div><div><div><font face="'courier new', monospace" size="1">static void setup_sci_keys(ScintillaObject *sci)</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>gchar *keyconfigfile;</font></div>

<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;">       </span>GKeyFile *keyconfig = g_key_file_new();</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;">  </span>keyconfigfile = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "keys.conf", NULL);</font></div>


<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;">       </span>g_key_file_load_from_file(keyconfig, keyconfigfile, G_KEY_FILE_NONE, NULL);</font></div>

<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;">       </span>get_keybindings(keyconfig);</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>g_free(keyconfigfile);</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;">   </span>g_key_file_free(keyconfig);</font></div>


<div><br></div></div></div></div></blockquote><div><br>Above looks ok at first glance except for absence of error checking that would be required in production version<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><br></div><div><div><font face="'courier new', monospace" size="1">static void get_keybindings(GKeyFile *config)</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>const gchar group[] = "keys";</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;">  </span>gchar **keys = g_key_file_get_keys(config, group, NULL, NULL);</font></div>


<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;">       </span>gchar **ptr = keys;</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>gchar **list;</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;">    </span>gsize len;</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>if (!ptr)</font></div>

<div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;">               </span>return;</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>while (1)</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>const gchar *key = *ptr;</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>if (!key)</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"><br></font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;">                </span>list = g_key_file_get_string_list(config, group, key, &len, NULL);</font></div>


<div><font face="'courier new', monospace" size="1">//<span style="white-space: pre-wrap;">             </span>int i=0; </font></div><div><font face="'courier new', monospace" size="1">//<span style="white-space: pre-wrap;">              </span>for(i<list.length; i++) {</font></div>


<div><font face="'courier new', monospace" size="1">//<span style="white-space: pre-wrap;">                     </span>printf("%s", list[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>}</font></div><div><font face="'courier new', monospace" size="1"><span style="white-space: pre-wrap;">        </span>g_strfreev(keys);</font></div>


<div><font face="'courier new', monospace" size="1">}</font></div><div><br></div><br></div></div></div></div></blockquote><div><br><br>You never increment ptr in the while loop so you only ever get the first list. Instead of the while use:<br>
<br>for (ptr = keys; *ptr; ++ptr)<br>{<br>/*get the strings*/<br>}<br><br>and use the same thing to itterate over the strings returned in the list, your commented out list.length won't work<br><br>You can safely pass *ptr as the key to g_key_file_get_string, you don't need key inside the loop<br>
<br>You don't free the list returned, probable memory leak<br><br>Cheers<br>Lex<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><div></div><div class="h5"><div><br></div><div><br></div><div><div class="gmail_quote">On Sun, Jan 30, 2011 at 8:42 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>On 31 January 2011 12:15, 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;">
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><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><div><div></div><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></div><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><font color="#888888">Lex<br><br><br></font></div><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>
<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" 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></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></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>