-
-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Summary
On JIS (Japanese 106/109) keyboard layouts, the in-game text editor’s intellisense “accept/apply suggestion” hotkey (implemented as GLFW_KEY_BACKSLASH) ends up triggering on the ] key, and the intended backslash key does not work as expected.
This makes intellisense acceptance effectively mapped to the wrong physical key on JIS keyboards.
Affected behavior
- Intellisense suggestion list is shown
- Pressing the physical backslash key does not accept the suggestion
- Pressing the physical
]key does accept the suggestion (unexpected) - Additionally, the editor prevents typing a literal
\when using the backslash key as the intellisense accept hotkey, but when acceptance is triggered via]on JIS layouts,]is still inserted into the code, causing an extra unwanted character.
Screenshots
1) Before accepting (suggestion shown)

2) After pressing ] (suggestion accepted, but ] is also inserted)
![After pressing ] (suggestion accepted, but ] is also inserted)](https://private-user-images.githubusercontent.com/66238042/556289586-5e0dc592-6627-42c6-a057-c9a74af0d7b1.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzIzMTQxNjMsIm5iZiI6MTc3MjMxMzg2MywicGF0aCI6Ii82NjIzODA0Mi81NTYyODk1ODYtNWUwZGM1OTItNjYyNy00MmM2LWEwNTctYzlhNzRhZjBkN2IxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAyMjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMjI4VDIxMjQyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZkM2ExODcxZjMxMTc5ZjFlZjJkYWQyMzRkMzkyMTlhMzk5ZjIzODQ5Yzc5M2IyMWQxMGQyODYzOGI1MDAyMWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Ql1Nu2V4BW-RhcAp3h2lOgmJHZsJZRxFCmpgoDQEDB0)
3) Expected result (suggestion accepted with no extra character inserted)

Steps to reproduce
- Use Windows with a JIS (Japanese 106/109) keyboard layout
- Open the SFM in-game program editor (text editor)
- Get into a state where intellisense suggestions are available/visible
- Press the physical backslash key -> suggestion is not accepted
- Press the physical
]key -> suggestion is accepted, but]is also typed into the document
Expected behavior
The intellisense accept hotkey should be bound to the intended physical key across keyboard layouts, or be configurable, so that JIS users can use the backslash key to accept suggestions.
When the accept hotkey is used, no extra character should be inserted into the document (same behavior as the backslash key suppression logic).
Notes / possible cause
This appears to be caused by keyboard-layout differences in how GLFW key codes map to physical keys. Using a fixed GLFW_KEY_BACKSLASH check may not correspond to the backslash key on JIS layouts, and instead matches the key that produces ].
Environment
- OS: Windows 11
- Keyboard: JIS (Japanese 106/109)
- ModPack: ATM 10: TTS 1.9.1
- SFM version: 4.28.0