Can't type the @ symbol
So, I have a relatively weird keyboard layout, where you have to press Ctrl+Alt+V (AltGr+V) to type the @ symbol. https://github.com/FNA-XNA/FNA/blob/575439a3577c8d3d77f832f07ea8259dbda490ec/src/FNAPlatform/SDL2_FNAPlatform.cs#L946-L952 https://github.com/FNA-XNA/FNA/blob/575439a3577c8d3d77f832f07ea8259dbda490ec/src/FNAPlatform/SDL2_FNAPlatform.cs#L961-L965 I'm not entirely sure how to fix this properly, but it seems checking if Left Alt and Right Alt aren't pressed does the trick. I know Ctrl+Shift+V pastes normally on Windows, so Alt seems to be the only special key that changes the behavior.
I want to say that the issue could be less about the keys and more about the mod state... I do know we have support in SDL for alt/shift/etc but I don't know if it would be applicable to this situation - ideally we could get an event that explicitly asks for a paste operation, so that we aren't manually checking keys like this.
This is wild speculation on my part though; if there's not a graceful way to get the paste request I'd be okay with adding checks for Alt keys being released.
I did see a mention of SDL_CLIPBOARDUPDATE elsewhere https://github.com/emscripten-ports/SDL2/issues/125#issuecomment-658110102 however the best I could find about that event is that it may be experimental and triggers on.. clipboard update.
Now that I think about it, what's the reason for using textInputSuppress? It's only set when Ctrl+V are pressed, and only used with the SDL_TEXTINPUT event, however pressing Ctrl+V doesn't trigger the text input event on Windows. I'm guessing it's an issue with a different platform then?
I believe so, yes - that's been there for close to 9 years though, so it's been a while since we've really looked at this portion thoroughly 😅
Correction, it's been almost 10 years!
https://github.com/flibitijibibo/FNA-MGHistory/pull/96
Oh wow, I've tried following the blame trail, but I didn't know about the archive repo. Also, thanks for the speedy replies.
@flibitijibibo / @araghon007 You guys might be interested in: https://github.com/pthom/hello_imgui/issues/3#issuecomment-1568346795 ...that is regarding Emcripten, SDL and Copy/Paste events.