#93 extended ascii char. from keyboard are ignored

open
nobody
None
5
2013-07-06
2013-05-02
No

When playing notes with computer keybord, neither extended ascii key nor dead key
can be used for mapping.
Then, with a french azerty keybord, only the bottom set of keys is usefull.
There are in fact two different issues :
- the extended ascii keys : only one line of code has to be changed!
In brightonControllers.c, inside brightonMapKeyboard method, the "from" variable
must be declared "unsigned char" in place of "int".
That's it! Well almost: the profile file must be coded in any kind of iso 8859
to get extended ascii characters on one byte.
See the attached file brightonControllers.c.patch-minimal
Note. To use UTF 8 coding (or any other multi bytes coding), (unsigned) int or char
declarations would have to be replaced by wchar_t. That's an other story.
- the dead keys (on a french azerty keyboard, the key "^" between "p" and "$" is one of them...)
Here a list of substitutions is needed. I added a dynamic array to brightonWindow. It's not
very clean but it avoids any other change of existing struct definitions. To fill this
array, I added a optional fourth field to "KM" records in the profile file.
See attached files brightonControllers.c.patch, brightoninternals.h.patch
and brightonWindowMgt.c.patch. These patches deal also with the first issue above.

Solve the first issue would be already a big step forward, for a very little price.

Discussion

  • Pierre Raoul

    Pierre Raoul - 2013-07-06

    Herewith a script to get a profile file for Mini Moog (or any other profile file if specified with PROFILE_FILE_NAME) with french azerty keyboard mapping.

    It needs the three last patch files of my previous message: "^" dead key is used. The key mapping format is changed and now is:
    KM: Extended_ASCII MIDI_note [MIDI_chan [key_code]]

    Nothing is changed for usual keys.
    For a dead key:
    - Extended_ASCII is any arbitrary character not present on the keyboard
    - key_code is the code returned by the keyboard on hitting the dead key

    If the changes are made with an editor, the file must be saved with any ISO 8859 encoding scheme.

     

Log in to post a comment.