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

Expose "keycodes_per_modifier" property getter #272

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andy-zetier
Copy link

The GetModifierMapping request returns a list of keycodes. Client code needs to iterate this list in chunks of keycodes_per_modifier to visit all keycodes for each of the 8 modifiers (Shift, Lock, Control, Mod1, Mod2, Mod3, Mod4, Mod5).

The preexisting whitelist of properties/fields that should not be hidden has been extended to include this field.

Fixes #271

The generated code diff looks like this:

diff main/xinput.rs fix/xinput.rs
21933c21933
<     fn keycodes_per_modifier(&self) -> u8 {
---
>     pub fn keycodes_per_modifier(&self) -> u8 {
diff main/xproto.rs fix/xproto.rs
26678c26678
<     fn keycodes_per_modifier(&self) -> u8 {
---
>     pub fn keycodes_per_modifier(&self) -> u8 {

The GetModifierMapping request returns a list of keycodes. Client code
needs to iterate this list in chunks of keycodes_per_modifier to visit
all keycodes for each of the 8 modifiers (Shift, Lock, Control, Mod1,
Mod2, Mod3, Mod4, Mod5).

The preexisting whitelist of properties/fields that should not be
hidden has been extended to include this field.

Fixes rust-x-bindings#271
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.

GetModifierMappingReply::keycodes_per_modifier() is not pub
1 participant