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

Compiling with Terminal.Gui 2.0.0-pre.243 #268

Merged
merged 3 commits into from
Dec 30, 2023
Merged

Compiling with Terminal.Gui 2.0.0-pre.243 #268

merged 3 commits into from
Dec 30, 2023

Conversation

tznind
Copy link
Collaborator

@tznind tznind commented Dec 23, 2023

FYI @dodexahedron theres a lot of changes in here around key handling. So be aware if adding new testing in this area that there may be merge conflicts.

This PR is a WIP. Lots of changes that need testing

Issues:

  • Setting a shortcut on a status bar item seems to require multiple button clicks to register
  • There are various bits of code where TGD 'hot swaps' keys e.g. Shift+Right in a menu moves to submenu. TGD previously edited the keystrike event to switch to a Right so that when control passes back to gui.cs the menu expands. This is no longer possible
  • Key handling is broken in general e.g.
    • Pressing Enter in 'Overwrite Files?' dialog does not complete operation despite Ok being default button
    • Pressing Enter in big textbox modal inserts a newline before closing - unclear if this is reflected in the returned value from dialog e.g.
      image

Unclear if any of these issues are core gui.cs issues with the new keybinding stuff which is very cutting edge. I will investigate further.

@dodexahedron
Copy link
Contributor

Thanks for the heads up!

@dodexahedron
Copy link
Contributor

dodexahedron commented Dec 24, 2023

I merged the current state of this branch into my working branch, to get ahead of some of the breaking changes. Most notably, Key now requiring the WithShift to get capitals is a pretty interesting change, where the tests and configuration are concerned. That stuff caused 53 failures in KeyMapTests, and did break keymap configuration loading in TGD, so I'll work on a fix for that and the corresponding tests.

Honestly, I'm not a fan of that behavior, as it is different than any other typical usage of keys out there and also breaks the conversion of KeyCode to Key, which causes a case change now. The cast behavior from character is also broken, and, for example, casting 'N' to Key now results in a case change, as well.

@dodexahedron
Copy link
Contributor

I saw your bug gui-cs/Terminal.Gui#3071 and commented over there with my initial findings.

@dodexahedron
Copy link
Contributor

#264 has the current state of this branch merged into it and now passes tests after the last couple of commits I did a few minutes ago.

Have a look whenever you're ready. :)

@tznind tznind merged commit 1c4befa into v2 Dec 30, 2023
1 check failed
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.

2 participants