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

[feat] Add leftsuper and rightsuper Keys #214

Closed
wants to merge 3 commits into from

Conversation

trueNAHO
Copy link
Contributor

Motivation

Towards a more ergonomic working environment. This PR enables the use of the super key as a keysym.

Help Needed

All tests successfully pass:

$ make test
test result: ok. 51 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s

     Running unittests src/main.rs (target/debug/deps/swhks-328709fb84de0909)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

However, the added unit test does not seem to work as expected when added to $HOME/.config/swhkd/swhkdrc:

leftsuper
    konsole

rightsuper
    qutebrowser

Possibly, the key listener is unable to distinguish between config::Modifier::Super and Key::KEY_LEFTMETA or Key::KEY_RIGHTMETA key presses because both Key::KEY_LEFTMETA and Key::KEY_RIGHTMETA keys are mapped to the same config::Modifier::Super modifier:

let modifiers_map: HashMap<Key, config::Modifier> = HashMap::from([
    (Key::KEY_LEFTMETA, config::Modifier::Super),
    (Key::KEY_RIGHTMETA, config::Modifier::Super),
]);

Since I am unfamiliar with Rust, I believe it would be appropriate for someone with Rust experience to handle this situation.

Closes Issue

Related Issues

Heavily Inspired By

@obvionaoe
Copy link

What's blocking this PR?

@Shinyzenith
Copy link
Member

I believe this pr is incomplete if memory serves me correctly.

@Shinyzenith
Copy link
Member

Feel free to finish up on the work

@trueNAHO
Copy link
Contributor Author

trueNAHO commented Sep 8, 2023

Apologies for the confusion and delay in my response. This PR was meant as a starting point, but I can't finish it myself:

Since I am unfamiliar with Rust, I believe it would be appropriate for someone with Rust experience to handle this situation.

I should have opened an issue instead of submitting an incomplete PR. Feel free to take over and initiate a new one.

@trueNAHO trueNAHO closed this Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants