Code Monkey home page Code Monkey logo

Comments (15)

jangler avatar jangler commented on July 19, 2024 2

ANSI?? nvm not supporting that lmao

from faunatone.

Savestate2A03 avatar Savestate2A03 commented on July 19, 2024 1

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.

from faunatone.

langel avatar langel commented on July 19, 2024 1

oof
character encoding is nightmare fuel

from faunatone.

Savestate2A03 avatar Savestate2A03 commented on July 19, 2024

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.

image

from faunatone.

jangler avatar jangler commented on July 19, 2024

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.

from faunatone.

Savestate2A03 avatar Savestate2A03 commented on July 19, 2024

I'll give it a test in the morning 👍

from faunatone.

langel avatar langel commented on July 19, 2024

is that the kind of freak keyboards they sell in sweden?!?! wowowowow

from faunatone.

Savestate2A03 avatar Savestate2A03 commented on July 19, 2024

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.

from faunatone.

langel avatar langel commented on July 19, 2024

wow when did capslock get a 32bit keycode? 😭

from faunatone.

Savestate2A03 avatar Savestate2A03 commented on July 19, 2024

Apparently they're all 32 bit!

Keycodes without character representations are determined by their scancode bitwise OR-ed with 1<<30 (0x40000000).

via https://wiki.libsdl.org/SDLKeycodeLookup

from faunatone.

langel avatar langel commented on July 19, 2024

oh wow! i'm learning sdl right now and i haven't done much with the keyboard yet :o

from faunatone.

jangler avatar jangler commented on July 19, 2024

@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.

from faunatone.

jangler avatar jangler commented on July 19, 2024

Well, I guess I won't be able to fix the input problem itself. But I can try to handle the character encoding part.

from faunatone.

Savestate2A03 avatar Savestate2A03 commented on July 19, 2024

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!

image

from faunatone.

Savestate2A03 avatar Savestate2A03 commented on July 19, 2024

image

from faunatone.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.