Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extended ascii char. from keyboard are ignored #26

Open
atao60 opened this issue May 24, 2021 · 1 comment
Open

extended ascii char. from keyboard are ignored #26

atao60 opened this issue May 24, 2021 · 1 comment
Labels
Bristol-issue Issue reported originally to Bristol Project Bugs

Comments

@atao60
Copy link

atao60 commented May 24, 2021

When playing notes with computer keybord, neither extended ascii key nor dead key
can be used for mapping.
Then, e.g. 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.

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

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

See #93 extended ascii char. from keyboard are ignored

@atao60
Copy link
Author

atao60 commented May 24, 2021

Thanks for having migrated bristol to Github.

Pull request will follow for the above issue.

atao60 added a commit to atao60/bristol-fixes that referenced this issue May 24, 2021
atao60 added a commit to atao60/bristol-fixes that referenced this issue May 24, 2021
atao60 added a commit to atao60/bristol-fixes that referenced this issue May 24, 2021
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
atao60 added a commit to atao60/bristol-fixes that referenced this issue May 24, 2021
@nomadbyte nomadbyte added the Bristol-issue Issue reported originally to Bristol Project Bugs label May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bristol-issue Issue reported originally to Bristol Project Bugs
Projects
None yet
Development

No branches or pull requests

2 participants