Would something like this be accepted? Basically this is a stopgap measure until something is done to Blender’s keyboard handling to drag it into the Unicode world out of the legacy keycode jungle. (But I guess nobody is working on such?)
Argh, now I notice that the enumerators GHOST_kKeyA … GHOST_kKeyZ are defined to have the actual values of characters ‘A’ to ‘Z’. Similarly, EVT_AKEY … EVT_ZKEY are defined to have the values of characters ‘a’ to ‘z’. Sad. That means that I probably should not add my new letter enumerators simply to the end of that, as they will then overlap with the brackets, backslash, etc characters that follow Z in ASCII, that also have their own GHOST_kKeyFoo symbolic names.
Probably I should just forget this attempt and instead start working on a multi-month effort to clean up all this and introduce true generic arbitrary Unicode key handling instead. (Just kidding.)
Revised the patch, as a new revision in the same gist: Initial Blender hack to enable binding of some non-English Latin keys · GitHub
Is this specifically for the Mac? I see you are changing GHOST_SystemCocoa.mm but not any other platform Ghost files.
I just did the Mac part initially, as that is where I use Blender. But I do have Windows and Linux boxes, too, and experience in programming for those. Didn’t want do spend time on them before I get some feedback whether this is an idea that would be acceptable at all.
Would we be interested? Of course. It is always a good thing to support more languages. Would it be accepted? Hard to say, as our keyboard mapping can sometimes be a bit… complicated.
Some of this complication can be best explained with a hypothetical game example. You are designing a game and decide that directional movement should be done with the WASD keys. But then what happens when a user has a Dvorak layout? You either have them use the same physical keys and so can use their left hand, or you have them press their logical “WASD” keys that are now spread all over the keyboard.
Your patch does not seem to be generally about the treatment of non-English letters but looks to be specifically about better supporting some letters that are directly entered with keyboards designed for Finnish, Swedish, German, Danish, Norwegian languages. What happens when pressing those keys on those keyboards now? If you currently get nothing but your patch gives you the proper Ö, Æ, Ø, etc then there is great chance of getting such a thing accepted. But if you currently get something like a semicolon, comma, or left square bracket then things could get a bit more complicated.
Personally I would start by posting this as a “WIP” so we can look at it and potentially test it.