Closed Savestate2A03 closed 2 years ago
To clarify: in addition to not displaying properly, the shortcut itself doesn't work. The font does seem to support the character when used in a text editor.
The SDL documentation says:
"`" (Located in the top left corner (on both ANSI and ISO keyboards). Produces GRAVE ACCENT and TILDE in a US Windows layout and in US and UK Mac layouts on ANSI keyboards, GRAVE ACCENT and NOT SIGN in a UK Windows layout, SECTION SIGN and PLUS-MINUS SIGN in US and UK Mac layouts on ISO keyboards, SECTION SIGN and DEGREE SIGN in a Swiss German layout (Mac: only on ISO keyboards), CIRCUMFLEX ACCENT and DEGREE SIGN in a German layout (Mac: only on ISO keyboards), SUPERSCRIPT TWO and TILDE in a French Windows layout, COMMERCIAL AT and NUMBER SIGN in a French Mac layout on ISO keyboards, and LESS-THAN SIGN and GREATER-THAN SIGN in a Swiss German, German, or French Mac layout on ANSI keyboards.)
…which makes it sound to me like your § key should activate a shortcut mapped to `. If not then I'm not sure how to solve this.
The character does display correctly for me on Linux which makes me think that part is a UTF8 vs UTF16 problem.
I'll give it a test in the morning 👍
is that the kind of freak keyboards they sell in sweden?!?! wowowowow
lmao yeah puke, i spilled an energy drink on my old keyboard and picked this up at the store completely forgetting they had different keyboards here. figured i might as well get used to it though since i'm living here for the foreseeable future
also has åäö and other goodies like native grave key usage to get £ and €
Tried setting grave mark in settings and using section key, doesn't seem to work. Here's a test after using the SDL2 wrapper for Python to get the scancode, keycode, and keyname if it exists. The 3rd is the Section key on a nordic keyboard.
PS C:\Users\eelkjos\Documents\sdltest> python .\sdltest.py
UserWarning: Using SDL2 binaries from pysdl2-dll 2.0.16
SDL_Scancode: 11
SDL_Keycode: 104
SDL_GetKeyFromScancode(): 104
SDL_GetKeyName(): b'H'
-------------------------
SDL_Scancode: 57
SDL_Keycode: 1073741881
SDL_GetKeyFromScancode(): 1073741881
SDL_GetKeyName(): b'CapsLock'
-------------------------
SDL_Scancode: 53
SDL_Keycode: 167
SDL_GetKeyFromScancode(): 167
SDL_GetKeyName(): b'\xc2\xa7'
Doesn't seem that there is a key name for this scancode.
Ok, so turns out utf-8 c2a7 is the section symbol, and testing on my work laptop, this actually works just fine. Something is up on my home desktop then, def something with encoding. I'll have to see what's up.
wow when did capslock get a 32bit keycode? 😭
Apparently they're all 32 bit!
Keycodes without character representations are determined by their scancode bitwise OR-ed with 1<<30 (0x40000000).
oh wow! i'm learning sdl right now and i haven't done much with the keyboard yet :o
@Savestate2A03 when you get a chance, can you attach the settings.csv that's causing the problem? I should be able to fix it from there.
Well, I guess I won't be able to fix the input problem itself. But I can try to handle the character encoding part.
Oops, forgot and went to bed without getting on my desktop lol. Just checked, can confirm it was an encoding issue. Excel was encoding with ANSI, opened it with notepad and changed it to UTF-8 and it works fine. Thanks Excel!
ANSI?? nvm not supporting that lmao
oof character encoding is nightmare fuel
Attempting to use the section sign "§" (U+00A7) as a shortcut key doesn't seem to work.
Images attached
Windows 10-20H2 faunatone v0.1.0