Skip to content

Conversation

@BAProductions
Copy link

@BAProductions BAProductions changed the title Keyboard Support Redo https://github.com/elementary/calculator/pull/242 Keyboard Support Redo Mar 14, 2023
@BAProductions BAProductions marked this pull request as ready for review March 14, 2023 00:55
@BAProductions
Copy link
Author

@danirabbit

@danirabbit
Copy link
Member

If you're forwarding key events there's no reason to do all that manual key press handling

Copy link
Member

@lenemter lenemter left a comment

Choose a reason for hiding this comment

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

Is there a reason you change the copy and paste logic? Is there maybe an issue we don't know about?

@BAProductions
Copy link
Author

Is there a reason you change the copy and paste logic? Is there maybe an issue we don't know about?

Yes because my entry is set to read only

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
@BAProductions BAProductions requested a review from lenemter March 14, 2023 13:51
@BAProductions
Copy link
Author

If you're forwarding key events there's no reason to do all that manual key press handling

Let me test this out

@BAProductions
Copy link
Author

BAProductions commented Mar 14, 2023

If you're forwarding key events there's no reason to do all that manual key press handling

Can test my code just so I can make sure the nothing funny happening on my end?
& second this how the Gnome Calculator is handal the key events as well

https://gitlab.gnome.org/GNOME/gnome-calculator/-/blob/master/src/math-display.vala#L124

@BAProductions BAProductions requested review from danirabbit and removed request for lenemter March 14, 2023 17:58
…cked function

- Exposing every single buttons like this isn't necessary & calling the for each button is a better idea EXP: activate_action(ACTION_INSERT, new GLib.Variant("s", "Character Gos Here")); is batter. 

The del calc button do not use glib actions 
Calling button_del_clicked(); & button_calc_clicked(); is nessary.
@BAProductions BAProductions requested review from lenemter and removed request for danirabbit March 16, 2023 14:08
@BAProductions
Copy link
Author

All the necessary have been made please review my code.

@BAProductions BAProductions requested review from danirabbit and removed request for lenemter March 16, 2023 15:35
@BAProductions
Copy link
Author

@danirabbit

@danirabbit
Copy link
Member

Please be patient. You're not the only person waiting on me for a review :)

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.

3 participants