-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add keyboard support #242
base: main
Are you sure you want to change the base?
Add keyboard support #242
Conversation
basically control V does nothing ATM, Because the code for reading the clipboard is giving me error, So is anyone wants to jump in help figure the code out going on with the the code for reading the clipboard that would be awesome. |
It posable do animated the button by adding a css class to change the background color on key_press & then removing it on key_release |
@BAProductions Thank you for looking into this. Our stylesheet doesn't support this |
The only thing that's still not working is Control V to paste aka I don't understand how to read the clipboard in GTK4, But I know how to do in GTK3. |
I just tested & all the buttons get highlights when Using |
This comment was marked as resolved.
This comment was marked as resolved.
Added that in #245 |
@BAProductions After #245 is merged can you please remove copy and paste functionality from this PR please? Also please fix lint issues, you can install vala-lint from https://github.com/vala-lang/vala-lint to check lint localy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the right way to do this. Probably what you want to do instead is set up a key event forwarder like this: https://github.com/elementary/switchboard/blob/b013b28bd18703812857e443b6791756e00f3498/src/Application.vala#L259
This might work, But i'm going to redo everything & open a new PR, so then I can have a clean slate adding & setting up key event forwarder. |
Since entry is now in read only mode .grab_focus () & etc is no longer needed;
Remove application_instance.set_accels_for_action (ACTION_PREFIX + ACTION_CLEAR, {"Escape"}); & let event control handle it or the escape button will not animate.
Since Gdk.Key.Return is user by default to trigger the selected UI element when navigating the UI with the arrow keys or the tab keys the equal button will never get pressed or fire, But instead the highlight button will be pressed so Gdk.Key.equal makes the most since
Add keyboard support Resolves #218, #220