Skip to content

Issue 26: extended ascii char. from keyboard are ignored #28

Open
atao60 wants to merge 4 commits into
nomadbyte:developfrom
atao60:issue-26
Open

Issue 26: extended ascii char. from keyboard are ignored #28
atao60 wants to merge 4 commits into
nomadbyte:developfrom
atao60:issue-26

Conversation

@atao60

@atao60 atao60 commented May 24, 2021

Copy link
Copy Markdown

When playing notes with computer keyboard, neither extended ASCII key nor dead key can be used for mapping.
Then, e.g. with a french AZERTY keyboard, only the bottom set of keys is useful.

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 some kind of iso 8859 to get extended ascii characters on one byte.

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 (e.g. on a french AZERTY keyboard, the key "^" between "p" and "$" is one of them...). Here a list of substitutions is needed. Can be done by adding a dynamic array to brightonWindow. It's not very clean but it avoids any other change of existing struct definitions. To fill this array, add a optional fourth field to "KM" records in the profile file.

See #93 extended ascii char. from keyboard are ignored

atao60 added 4 commits May 24, 2021 07:12
Specify the device name (amongst files under /usr/local/share/bristol/memory/profiles)
with env var PROFILE_FILE_NAME ('mini' by default)
The key mapping format is changed and now is:
    KM: Extended_ASCII MIDI_note [MIDI_chan [key_code]]
If the changes are made with an editor, the file must be
saved with any ISO 8859 encoding scheme.
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

See issue nomadbyte#26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant