Page MenuHome

VK_OEM_8 key on Swiss keyboard variants
Needs ReviewPublic

Authored by matc (matc) on Aug 12 2019, 4:49 PM.



Handles VK_OEM_8 key for Swiss keyboard variants.

Diff Detail

rB Blender

Event Timeline

matc (matc) created this revision.Aug 12 2019, 4:49 PM

This adds a dollar sign key event that is only possible to trigger on Swiss keyboards. That's quite odd.

Is there some more generic solution possible here? I have a dollar sign key on my Belgian keyboard and it's currently unsupported, but hardcoding this for all languages is impractical.


We should not spam the console with information like this. This is going to generate a ton of output on system with languages other than french, english, german or italation.

Brecht Van Lommel (brecht) requested changes to this revision.Aug 14 2019, 5:24 PM
This revision now requires changes to proceed.Aug 14 2019, 5:24 PM

Reverted the entire patch and instead removed the filter for GHOST_kKeyUnknown. This allows to at least write text, even if a key is technically not known. (Same behaviour as for X11 with utf8.)

Added default case handling to processSpecialKey. Made sure all Swiss variants are handled the same. These two things are not strictly necessary, but they feel like the right thing to do.

I chose GHOST_kKeyBackslash as default because of a comment on for SDL_SCANCODE_BACKSLASH:

"\" (Located at the lower left of the return key on ISO keyboards and at the right end of the QWERTY row on ANSI keyboards. Produces REVERSE SOLIDUS (backslash) and VERTICAL LINE in a US layout, REVERSE SOLIDUS and VERTICAL LINE in a UK Mac layout, NUMBER SIGN and TILDE in a UK Windows layout, DOLLAR SIGN and POUND SIGN in a Swiss German layout, NUMBER SIGN and APOSTROPHE in a German layout, GRAVE ACCENT and POUND SIGN in a French Mac layout, and ASTERISK and MICRO SIGN in a French Windows layout.)