Skip to content

Add support for ignoring Qukeys activation on the same hand#1539

Open
eirvandelden wants to merge 1 commit intokeyboardio:masterfrom
eirvandelden:master
Open

Add support for ignoring Qukeys activation on the same hand#1539
eirvandelden wants to merge 1 commit intokeyboardio:masterfrom
eirvandelden:master

Conversation

@eirvandelden
Copy link
Copy Markdown

This fixes #1407

Disclaimer: I'm a web developer and this is too low level for me. This is the code Claude Opus generated for me to be able to use Qukeys, but ignore activations from the same hand. I.e. having homerow mods, it will ignore a held key when activating with another key on the same hand (output 2 different keys), but if I hold one key and then press another key on the other cluster, it does trigger the alt mode.

Signed-off-by: Etienne van Delden de la Haije <etienne@vandelden.family>
Comment on lines +197 to +205
// If the opposite-hands rule is enabled and this subsequent key is on
// the same hand as the qukey, immediately flush as primary. There's no
// need to wait for the overlap comparison because same-hand rollover
// is never treated as a modifier chord.
if (require_opposite_hands_ &&
!oppositeHands(queue_head_addr, event_queue_.addr(i))) {
flushEvent(queue_head_.primary_key);
return true;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears to me that this clause should be outside of the parent condition, similar to the spacecadet check at L190

bool require_opposite_hands_{false};

// The column index that divides left and right hands.
uint8_t split_column_{8};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it would be possible (and maybe better) to use the driver data instead of hard coding a number that just so happens to work for two of Keyboardio's keyboards. I think this should work:

Suggested change
uint8_t split_column_{8};
uint8_t split_column_ = kaleidoscope::Device::Props::KeyScannerProps::matrix_columns / 2;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try it out and let you know!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try it out and let you know!

@eirvandelden
Copy link
Copy Markdown
Author

@EvyBongers one of your 2 comments is not doing what we thought it would, I tried them and could activate alt modes again on the same cluster. I will experiment with each comment separately

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.

Qukeys support for same-hand/location-specific inactivation

2 participants