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

Assertion error when a key not in the Michela layout is accidentally hit #8

Open
Sillabix opened this issue Aug 18, 2022 · 4 comments

Comments

@Sillabix
Copy link

When a musical keyboard with 3 or more octaves is used, instead of the standard Michela machine with 20 keys, it can happen to hit accidentally a key which is not in the Michela layout. In this case the software doesn't recognize it, and produces the following error message: "Plover error: Qt GUI error. AssertionError: 'B2' (or whichever key not in the Michela layout) not in OrderedDict...."

To replicate this error just connect any midi controller, open Plover and just hit a music key which doesn't belong to the Michela layout

errore Michela 2
errore Michela

@benoit-pierre
Copy link
Member

I assume this is not a Michela specific issue, and it can happen with any system? If that's the case, can you open an issue on Plover's tracker instead? Thanks.

@Sillabix
Copy link
Author

Sillabix commented Aug 18, 2022

Ok, I'll put it in the general Plover's tracker

@benoit-pierre
Copy link
Member

benoit-pierre commented Aug 19, 2022

So the 2 machines provided by the plugin are there for convenience (each provides a working keymap), but the fact that the layout is a restricted subset of the MIDI Keyboard machine is the issue.

It's a problem if the physical machine does indeed have some extra MIDI keys that are not part of that restricted layout.

One option to fix the issue could be to ignore those extra keys in the code, but I think a better approach is to keep all those extra keys, and just map all of them to no-op per default.

@Sillabix
Copy link
Author

Sillabix commented Aug 19, 2022

Yes, the best approach is the latter also in my opinion: keep all the extra keys and map them to no-op per default. In the case of the 3+ octaves layout this is also mandatory because the user might want to use a 4 or 5 octaves or bigger keyboard and decide different octaves to use

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

No branches or pull requests

2 participants