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

The Simplified OptiKey #accessibility #860

Open
alexandre-mbm opened this issue Sep 7, 2022 · 3 comments
Open

The Simplified OptiKey #accessibility #860

alexandre-mbm opened this issue Sep 7, 2022 · 3 comments

Comments

@alexandre-mbm
Copy link
Contributor

alexandre-mbm commented Sep 7, 2022

Hello, guys!

I am working an accessiblity approach for my father, a ALS person in advanced state (issue #855). Initially is an simplified OptiKey with two screens only. The first "point of use" is a dynamic keyboard maximised (ref.: #857) always.

01-Main

Another screen is the dynamic keyboards selector as a "final point" for the user. From it the user can only "back" to maximised dynamic keyboards.

02-Selector

See the changes for this workaround here: v3.2.3...ENE:OptiKey:alberto

The problem

The initial change on "selector" is working as in this commit and shown in the image above. BUT the changes bellows are buggy:

// Calibrate key
{
    Key newKey = new Key();
    newKey.SymbolGeometry = (Geometry)this.Resources["CalibrateIcon"];
    newKey.Text = JuliusSweetland.OptiKey.Properties.Resources.RE_CALIBRATE;
    newKey.Value = KeyValues.CalibrateKey;
    this.AddKey(newKey, this.mRows - 1, 1);
}

// Yes/No keyboard key
{
    Key newKey = new Key();
    newKey.SymbolGeometry = (Geometry)this.Resources["YesNoIcon"];
    newKey.Text = JuliusSweetland.OptiKey.Properties.Resources.YESNO;
    newKey.Value = KeyValues.ConversationConfirmKeyboardKey;
    this.AddKey(newKey, this.mRows - 1, 2);
}

Mentions: @kmcnaught, @AmaralVini, @alandbm

@AdamRoden
Copy link
Contributor

@alexandre-mbm
Is it possible that you are adding the two new keys in the keyboard's initial definition section of code, but afterward they are getting overlayed/replaced by blank keys?

@alexandre-mbm
Copy link
Contributor Author

Yes, it can be... in tests: "blank buttons with actions, and no animations", but I looked for this on code already, a rebinding of objects, and I didn't see it.

@kmcnaught
Copy link
Collaborator

Hi @alexandre-mbm if I've understood correctly, you are trying to add a YesNo key and a Calibrate key in the bottom row. I think they are being replaced by empty keys in this block of code:

            // Add keyboard keys, or blanks
            int maxKeyboardsPerPage = (this.mCols - 2) * this.mRows;
            int totalNumKeyboards = folder.keyboards.Count;
            int remainingKeyboards = totalNumKeyboards - maxKeyboardsPerPage * pageIndex;
            int nKBs = Math.Min(remainingKeyboards, maxKeyboardsPerPage);
            int firstKB = maxKeyboardsPerPage * pageIndex;

I imagine this will be fixed by changing the first line to

            int maxKeyboardsPerPage = (this.mCols - 2) * (this.mRows - 1);

Alternatively, you could comment out this line so no blank keys are added at all:

            // Add empty/inactive key for consistent aesthetic
            this.AddKey(new Key(), r, c);

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

3 participants