<p></p>
<blockquote>
<p>So each key pressed to type a sentence in the editor has to go through the keybinding search?</p>
</blockquote>
<p>AFAICT yes.</p>
<blockquote>
<p>Couldn't it be implemented as a jump table? So it would take constant time to locate the correct response?</p>
</blockquote>
<p>There are 2^21 Unicode code points multiplied by 2^(the number of modifiers), so no.</p>
<p>A hash table might possibly be a solution, just "somebody" has to do it and make sure all the special cases in <a href="https://github.com/geany/geany/blob/04566236d3f9811d55d6c7bcc492b3a60369fd20/src/keybindings.c#L1348">this</a> are covered.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2956#issuecomment-954329243">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZC6MQ5F4B4AGSOK73UJHW4ZANCNFSM5GYIYOCQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJ57HU3HNGVPLLJLMZTUJHW4ZA5CNFSM5GYIYOC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHDQ6RGY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2956#issuecomment-954329243",
"url": "https://github.com/geany/geany/pull/2956#issuecomment-954329243",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>