nesbox / TIC-80

TIC-80 is a fantasy computer for making, playing and sharing tiny games.
https://tic80.com
MIT License
5.03k stars 488 forks source link

If`alt+1` produces a key that's valid in TIC-80, it gets inserted in the code editor instead of executing the shortcut #2661

Closed aliceisjustplaying closed 1 month ago

aliceisjustplaying commented 2 months ago

Per the title, for some reason the alt+1 shortcut will insert 1 but only under Linux.

Found while working on https://github.com/nesbox/TIC-80/pull/2657.

aliceisjustplaying commented 2 months ago

The Linux thing was a red herring: this happens with every keyboard layout where alt+1 produces a valid key.

On macOS with the default US keyboard, alt+1 produces ¡, which is not valid in TIC-80. On Windows 11 with the default US keyboard, alt+1 does nothing. Likely the reason this was not caught before.

aliceisjustplaying commented 2 months ago

This is a problem specifically when switching away the editor and switching back.

Miguel-hrvs commented 2 months ago

Is very similar to the f1 bookmark problem that was fixed recently.