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

[WIP] Add modifiers array to event_json #3931

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

[WIP] Add modifiers array to event_json #3931

wants to merge 1 commit into from

Conversation

petoknm
Copy link

@petoknm petoknm commented Mar 18, 2019

I want to make our sway i3bar implementation adhere to the i3bar protocol by adding missing "modifiers" field to event_json. (I'm working on an i3blocks blocklet and I'm missing the modifiers when using sway, i3 provides them)

Currently, I only added an empty array because I don't know exactly how to get the modifiers. The button variable does not contain any information about the modifiers so I guess we will have to call into wlr or somehow get the information into the function. I'm not sure about the inner architecture of sway to make a decision how exactly to do this, so I would like if someone could point me in the right direction.

@petoknm petoknm changed the title Add modifiers array to event_json [WIP] Add modifiers array to event_json Mar 18, 2019
@RedSoxFan
Copy link
Member

Currently, I only added an empty array because I don't know exactly how to get the modifiers.

swaybar does not receive keyboard events so it's not going to be able to access which modifiers are pressed

@emersion
Copy link
Member

Someone wanted to get the modifier information out of sway to display the current keyboard layout.

@petoknm
Copy link
Author

petoknm commented Mar 19, 2019

I assume it's sway sending those events... I think we could include modifiers along with those mouse events, or at least a way to somehow get the modifier state.

@emersion emersion added the enhancement New feature or incremental improvement label Apr 13, 2019
@emersion emersion marked this pull request as draft May 1, 2020 09:46
@emersion emersion added the i3-compat Sway doesn't match i3's behavior label May 1, 2020
@kraftwerk28
Copy link
Contributor

I made an implementation here: #6701, though it forced me to add a property to get_inputs command output, so swaybar can retrieve a list of modifiers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or incremental improvement i3-compat Sway doesn't match i3's behavior
Development

Successfully merging this pull request may close these issues.

4 participants