Instead of invoking the syntax prompt, pressing the Esc key inserts a symbol < 0x1b > that is not recognized in Xcode and causes compilation to fail. This issue occurs when Xcode 16 is running on macOS 15.0.1 (24A348), while it works well on macOS 15.0.0.
I tried using Xcode 16.1 Beta 6 on macOS 15.0.1, and the issue occurs there as well.
Can you open a bug report with exact steps to reproduce, and additional information such as a project before and after the invalid character insertion? Once you open the bug report, please post the FB number here for my reference.
If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?