serge-rgb / milton

An infinite-canvas paint program
GNU General Public License v3.0
1.53k stars 133 forks source link

Fix #142 allow ESC for keyboard shortcut #143

Closed gonutz closed 5 years ago

gonutz commented 5 years ago

SDLK_TAB=9 and SDLK_ESCAPE=27 are in the ASCII range so they are not treated differently in the shortcut handler code anymore. This fixes using ESC in a shortcut. Currently ESC is not used anywhere, that is why the bug was not found before.

serge-rgb commented 5 years ago

I'll merge this in, but the intention going forward is to make it so that ESC is used to exit modes, so it probably won't end up being rebindable.

gonutz commented 5 years ago

Oh that is interesting. As mentionend in another issue I am currently working on a text mode where you type text and it draw the respective brush strokes for you. The reason I created this pull request is to be able to bind ESC to exit text mode. B is a letter, thus it cannot be used for exiting text mode.