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

accesskey always on for non windows #207

Merged
merged 5 commits into from
Dec 15, 2024
Merged

Conversation

jinek
Copy link
Owner

@jinek jinek commented Dec 15, 2024

No description provided.

@jinek jinek requested a review from tomlm December 15, 2024 01:01
@jinek jinek linked an issue Dec 15, 2024 that may be closed by this pull request
@jinek jinek added enhancement New feature or request low priority labels Dec 15, 2024
Copy link
Contributor

coderabbitai bot commented Dec 15, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

This pull request introduces a new boolean property SupportsAltSolo across multiple console implementation classes in the Consolonia framework. The property is added to various console-related interfaces and classes, including IConsole, DummyConsole, DefaultNetConsole, InputLessDefaultNetConsole, UnitTestConsole, CursesConsole, and Win32Console.

The implementation varies across different console types, with some returning false (like DefaultNetConsole and CursesConsole) and others returning true (like Win32Console and UnitTestConsole). This suggests the property is related to platform-specific input handling capabilities, particularly around alternative key solo modes.

Accompanying the property addition, there are subtle changes in input handling methods like PauseIO in some console implementations. The ConsoleWindow class has also been modified to incorporate logic around access keys, introducing new fields and a method to manage access key display based on console capabilities.

The changes appear to be part of a broader effort to standardize and enhance input handling across different console platforms, providing a more consistent interface for managing console input and access key behaviors.

Possibly related PRs

  • 196 alt key accelerators arent rendered #201: The changes in DefaultNetConsole regarding key mappings and error handling for ALT key accelerators are related to the addition of the SupportsAltSolo property in the main PR, as both involve enhancements to key handling in the console.
  • Add ConsoloniaAccessText underline #205: The introduction of the ConsoloniaAccessText class, which deals with access keys and their visual representation, is relevant as it aligns with the overall theme of enhancing console capabilities, including the handling of ALT keys.
  • ALT+symbol works on linux #206: The modifications in CursesConsole for handling key events, particularly related to ALT key processing, directly connect to the changes made in the main PR regarding the SupportsAltSolo property, indicating a focus on improving input handling across different console implementations.

Suggested labels

bug

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. This feature will be included in our Pro Plan when released.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/Consolonia.Core/Helpers/Extensions.cs (1)

19-23: Excellent improvement to subscription management!

Returning IDisposable from SubscribeAction allows proper cleanup of subscriptions, preventing potential memory leaks. This change follows the standard Observable pattern and best practices.

Make sure to dispose of the subscription when it's no longer needed, typically in component cleanup or disposal methods.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 23ee278 and 202b764.

📒 Files selected for processing (9)
  • src/Consolonia.Core/Dummy/DummyConsole.cs (1 hunks)
  • src/Consolonia.Core/Helpers/Extensions.cs (1 hunks)
  • src/Consolonia.Core/Infrastructure/ConsoleWindow.cs (6 hunks)
  • src/Consolonia.Core/Infrastructure/DefaultNetConsole.cs (1 hunks)
  • src/Consolonia.Core/Infrastructure/IConsole.cs (1 hunks)
  • src/Consolonia.Core/Infrastructure/InputLessDefaultNetConsole.cs (2 hunks)
  • src/Consolonia.NUnit/UnitTestConsole.cs (1 hunks)
  • src/Consolonia.PlatformSupport/CursesConsole.cs (1 hunks)
  • src/Consolonia.PlatformSupport/WindowsConsole.cs (1 hunks)
🔇 Additional comments (10)
src/Consolonia.PlatformSupport/CursesConsole.cs (1)

143-143: Correct Override of SupportsAltSolo Property

The SupportsAltSolo property is correctly overridden to return false, which is appropriate for the CursesConsole implementation.

src/Consolonia.Core/Infrastructure/IConsole.cs (1)

23-23: Addition of SupportsAltSolo Property to IConsole Interface

The SupportsAltSolo property has been added to the IConsole interface, ensuring that all console implementations specify their support for Alt solo mode.

src/Consolonia.Core/Dummy/DummyConsole.cs (1)

36-36: Implementation of SupportsAltSolo Property in DummyConsole

The SupportsAltSolo property is implemented and returns false, which is suitable for the DummyConsole.

src/Consolonia.Core/Infrastructure/DefaultNetConsole.cs (1)

56-57: Override of SupportsAltSolo Property in DefaultNetConsole

The SupportsAltSolo property is correctly overridden to return false, aligning with the behavior of DefaultNetConsole.

src/Consolonia.NUnit/UnitTestConsole.cs (1)

42-42: LGTM! Property implementation is appropriate for test scenarios.

Setting SupportsAltSolo to true in the test console allows testing both supported and unsupported alt key scenarios through dependency injection.

src/Consolonia.Core/Infrastructure/InputLessDefaultNetConsole.cs (1)

14-14: Well-structured architectural changes!

Making the class abstract and adding the abstract SupportsAltSolo property enforces proper implementation in derived classes, ensuring explicit handling of alt key support across different platforms.

Let's verify that all derived classes implement the property:

Also applies to: 51-51

✅ Verification successful

All derived classes properly implement the abstract property

The verification confirms that all three derived classes (Win32Console, CursesConsole, and DefaultNetConsole) correctly implement the SupportsAltSolo property with appropriate platform-specific values:

  • Windows implementation returns true
  • Curses and default implementations return false
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Find all console implementations that should implement SupportsAltSolo
ast-grep --pattern 'class $_ : InputLessDefaultNetConsole {
  $$$
}'

Length of output: 70


Script:

#!/bin/bash
# Let's try a different approach to find derived classes
rg "class.*:.*InputLessDefaultNetConsole" -l

Length of output: 199


Script:

#!/bin/bash
# Also search for potential implementations with whitespace variations
rg "class\s+\w+\s*:\s*InputLessDefaultNetConsole" --type cs

Length of output: 397


Script:

#!/bin/bash
# Let's also check if there are any references to this base class
rg "InputLessDefaultNetConsole" --type cs

Length of output: 618


Script:

#!/bin/bash
# Let's check if these derived classes implement SupportsAltSolo
for file in src/Consolonia.PlatformSupport/WindowsConsole.cs src/Consolonia.PlatformSupport/CursesConsole.cs src/Consolonia.Core/Infrastructure/DefaultNetConsole.cs; do
    echo "=== $file ==="
    rg "SupportsAltSolo" "$file" -B 1 -A 1
done

Length of output: 1297

src/Consolonia.PlatformSupport/WindowsConsole.cs (1)

64-64: LGTM! Property implementation aligns with Windows console capabilities.

The implementation correctly indicates that Windows console supports Alt solo key combinations.

src/Consolonia.Core/Infrastructure/ConsoleWindow.cs (3)

33-34: LGTM! Fields properly encapsulate access key state.

The fields are appropriately scoped and named to manage the access key state.


52-57: LGTM! Robust implementation of access key property change handler.

The method correctly:

  • Guards against non-input root changes
  • Maintains access key visibility when required
  • Uses early returns for better readability

68-69: LGTM! Proper initialization of access keys state.

The implementation correctly sets the initial state of access keys when setting the input root.

src/Consolonia.Core/Infrastructure/ConsoleWindow.cs Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/Consolonia.Core/Infrastructure/ConsoleWindow.cs (1)

52-57: Add XML documentation to clarify the method's purpose.

While the implementation is correct, adding documentation would help explain why we're forcing access keys to stay visible.

+        /// <summary>
+        /// Ensures access keys remain visible when they are required to be always on.
+        /// This prevents access keys from being hidden when running on platforms that don't support Alt solo keys.
+        /// </summary>
+        /// <param name="args">The property change event arguments.</param>
         private void OnShowAccessKeyPropertyChanged(AvaloniaPropertyChangedEventArgs<bool> args)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 202b764 and d2db200.

📒 Files selected for processing (1)
  • src/Consolonia.Core/Infrastructure/ConsoleWindow.cs (6 hunks)
🔇 Additional comments (4)
src/Consolonia.Core/Infrastructure/ConsoleWindow.cs (4)

33-34: LGTM! Field declarations are well-structured.

The new fields follow proper naming conventions and encapsulation principles.


68-69: LGTM! Consistent with the access keys always-on behavior.

The modification ensures access keys are visible when required, maintaining consistency with the class's purpose.


448-448: Previous null reference issue has been properly addressed.

The use of the null-conditional operator ensures safe disposal of the subscription.


47-50: Verify consistent behavior across different console implementations.

The initialization logic is correct, but let's verify that all console implementations properly implement the SupportsAltSolo property.

✅ Verification successful

SupportsAltSolo property is consistently implemented across all console implementations

The verification shows that all console implementations properly handle the SupportsAltSolo property:

  • Windows Console: true (native Alt key support)
  • Curses Console: false (no Alt key support)
  • Default .NET Console: false
  • Unit Test Console: true (for testing purposes)
  • Dummy Console: false

The initialization logic in ConsoleWindow.cs correctly handles both supported and unsupported cases by enabling always-on access keys when Alt key is not supported.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify SupportsAltSolo implementation across console classes
# Expected: Find all console implementations and their SupportsAltSolo property implementations

# Search for console classes implementing SupportsAltSolo
ast-grep --pattern 'class $_ : $_ {
  $$$
  SupportsAltSolo $$$
  $$$
}'

Length of output: 74


Script:

#!/bin/bash
# Let's try a different approach to find SupportsAltSolo implementations
# First, let's find files containing "SupportsAltSolo"
rg -l "SupportsAltSolo"

# Then get the actual implementation context
rg "SupportsAltSolo" -B 2 -A 2

Length of output: 3713

@jinek jinek enabled auto-merge (squash) December 15, 2024 01:06
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/Consolonia.PlatformSupport/CursesConsole.cs (2)

Line range hint 261-262: Remove redundant comment about key combination limitation.

The comment about the inability to differentiate between Ctrl+Alt+alfa and Ctrl+Shift+Alt+alfa is repeated. Consider documenting this limitation in a central location, such as the class documentation.


Line range hint 1-585: Consider improving test coverage and documentation.

Given the complexity of key handling logic, especially around modifier key combinations, consider:

  1. Adding comprehensive unit tests for various key combinations
  2. Documenting platform-specific limitations in the class XML documentation
  3. Creating a test matrix for all supported key combinations
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d2db200 and ea04f6d.

📒 Files selected for processing (4)
  • src/Consolonia.Core/Infrastructure/ConsoleWindow.cs (6 hunks)
  • src/Consolonia.Core/Infrastructure/DefaultNetConsole.cs (1 hunks)
  • src/Consolonia.Core/Infrastructure/IConsole.cs (1 hunks)
  • src/Consolonia.PlatformSupport/CursesConsole.cs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/Consolonia.Core/Infrastructure/IConsole.cs
  • src/Consolonia.Core/Infrastructure/DefaultNetConsole.cs
🧰 Additional context used
📓 Learnings (1)
src/Consolonia.Core/Infrastructure/ConsoleWindow.cs (1)
Learnt from: jinek
PR: jinek/Consolonia#207
File: src/Consolonia.Core/Infrastructure/ConsoleWindow.cs:0-0
Timestamp: 2024-12-15T01:48:55.826Z
Learning: Once the issue has been solved, I should be able to mark it as resolved myself.
🔇 Additional comments (7)
src/Consolonia.Core/Infrastructure/ConsoleWindow.cs (4)

26-27: LGTM! Field declarations are well-designed.

The new fields follow good practices with appropriate types and immutability.


46-49: LGTM! Constructor initialization is correct.

The access key management is properly initialized based on console capabilities, with appropriate conditional subscription setup.


60-61: LGTM! SetInputRoot modification is appropriate.

The ShowAccessKeys property is correctly set based on the _accessKeysAlwaysOn flag.


448-448: LGTM! Proper disposal of subscription.

The _accessKeysAlwaysOnDisposable is correctly disposed with a null check.

src/Consolonia.PlatformSupport/CursesConsole.cs (3)

118-119: LGTM: Property addition is correct and aligns with PR objective.

The SupportsAltSolo property correctly indicates that this Curses-based console implementation doesn't support solo Alt key usage.


118-119: Verify the input handling during IO pause.

The addition of Curses.unget_wch((int)Key.Unknown) looks correct. This ensures proper input handling during IO pausing by injecting a sentinel key event.

✅ Verification successful

Input handling during IO pause is correctly implemented

The verification confirms that Key.Unknown is appropriately used as a sentinel value in the codebase:

  • It's the default value for key events
  • It's mapped to ConsoleKey.NoName in key mappings
  • It's used as a fallback in key processing
  • The unget_wch call with Key.Unknown in PauseIO follows the established input handling patterns
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other implementations of PauseIO to verify consistency
ast-grep --pattern 'public override void PauseIO(Task task) {
  $$$
}'

Length of output: 72


Script:

#!/bin/bash
# Search for PauseIO method implementations with a more flexible pattern
ast-grep --pattern 'PauseIO($$$) {
  $$$
}'

# Also search for any references to unget_wch to understand the input handling pattern
rg "unget_wch" -A 2 -B 2

Length of output: 1852


Script:

#!/bin/bash
# Let's look for the base implementation and Key.Unknown usage
rg "class.*Console.*PauseIO" -A 5

# Also check for Key.Unknown definition and usage
rg "Key\.Unknown" -A 2 -B 2

Length of output: 2052


Line range hint 306-306: Investigate and resolve ReSharper warning.

The comment // ReSharper disable once ConditionIsAlwaysTrueOrFalse todo: check why indicates an unresolved issue. This should be investigated and either fixed or properly documented.

✅ Verification successful

ReSharper warning can be safely suppressed - condition is valid

The warning appears to be a false positive. Looking at the Key enum definition, we can see that uppercase letters A-Z are defined with values starting from 65 (A) and continuing sequentially. The condition wch >= (uint)Key.A && wch <= (uint)Key.Z is a valid range check for uppercase letters, as it compares against these enum values. The comment can be updated to explain why the condition is valid instead of marking it as a todo.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for the condition context
ast-grep --pattern 'if (wch >= (uint)Key.A && wch <= (uint)Key.Z)
{
  $$$
}'

Length of output: 78


Script:

#!/bin/bash
# Search for the ReSharper warning comment and surrounding context
rg -B 2 -A 2 "ReSharper disable once ConditionIsAlwaysTrueOrFalse" src/Consolonia.PlatformSupport/CursesConsole.cs

Length of output: 470


Script:

#!/bin/bash
# Let's get more context around this condition to understand the logic better
rg -B 10 -A 10 "ReSharper disable once ConditionIsAlwaysTrueOrFalse" src/Consolonia.PlatformSupport/CursesConsole.cs

# Also check for Key enum definition to understand the value ranges
rg -l "enum Key" 

Length of output: 1372


Script:

#!/bin/bash
# Let's check the Key enum definition to understand the values
rg -A 30 "enum Key" src/Consolonia.GuiCS/Event.cs

Length of output: 984


Script:

#!/bin/bash
# Let's get more of the Key enum definition to see the A-Z values
rg -A 100 "enum Key" src/Consolonia.GuiCS/Event.cs

# Also get the full method context where this condition is used
ast-grep --pattern 'MapCursesKey($_) {
  $$$
}'

Length of output: 2205

Copy link
Collaborator

@tomlm tomlm left a comment

Choose a reason for hiding this comment

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

Why disable? I notice that JetBrians rider (Which I believe is an avlonia app) responds to Alt keys. Is there a technical limitation?

@jinek
Copy link
Owner Author

jinek commented Dec 15, 2024

Why disable? I notice that JetBrians rider (Which I believe is an avlonia app) responds to Alt keys. Is there a technical limitation?

System.Console does not process ALT key. Same most Linux terminals. So for this cases access keys will be always visible.
Rider is Java application.

btw what do you mean disable? I'm assuming not to disable anything in this PR

@tomlm
Copy link
Collaborator

tomlm commented Dec 15, 2024

When I tried the branch on ubuntu it didn't display any accelerators...it wasn't clear if you were trying to disable showing the accelerators or trying to turn them on permentaly.

@jinek
Copy link
Owner Author

jinek commented Dec 15, 2024

Let me investigate further then

@jinek jinek disabled auto-merge December 15, 2024 18:03
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/Consolonia.PlatformSupport/CursesConsole.cs (2)

Line range hint 149-426: Consider improving documentation and maintainability of input handling.

The input handling logic is complex with many special cases. Consider:

  1. Adding documentation explaining the key mapping strategy
  2. Breaking down the large ProcessInput method into smaller, focused methods
  3. Adding unit tests for different key combinations

Example structure:

 private void ProcessInput()
 {
+    // Get the next character/key
     int code = Curses.get_wch(out int wch);
     if (code == Curses.ERR)
         return;

     _keyModifiers = new KeyModifiers();
-    var k = Key.Unknown;
+    Key k = ProcessKeyCode(code, wch);
+    RaiseKeyPressInternal(k);
 }

+/// <summary>
+/// Processes a key code and returns the corresponding Key value
+/// </summary>
+private Key ProcessKeyCode(int code, int wch)
+{
+    if (code == Curses.KEY_CODE_YES)
+        return ProcessKeyCodeYes(wch);
+        
+    return ProcessRegularKey(wch);
+}

Line range hint 428-489: Consider adding XML documentation for key translation methods.

The key translation logic in RaiseKeyPressInternal is crucial for proper input handling. Consider adding XML documentation to explain:

  1. The purpose of key translation
  2. The relationship between different key representations
  3. The handling of special cases
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ea04f6d and 3ca4840.

📒 Files selected for processing (3)
  • src/Consolonia.Core/Helpers/Extensions.cs (1 hunks)
  • src/Consolonia.Core/Infrastructure/ConsoleWindow.cs (6 hunks)
  • src/Consolonia.PlatformSupport/CursesConsole.cs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/Consolonia.Core/Helpers/Extensions.cs
  • src/Consolonia.Core/Infrastructure/ConsoleWindow.cs
🔇 Additional comments (2)
src/Consolonia.PlatformSupport/CursesConsole.cs (2)

118-119: LGTM! Property implementation aligns with platform limitations.

The implementation correctly indicates that ALT key combinations are not supported in Curses-based terminals, which aligns with the PR objective of making access keys always visible on non-Windows platforms.


Line range hint 141-145: Verify the impact of injecting Key.Unknown during IO pause.

While the implementation looks correct, injecting Key.Unknown into the input stream could potentially affect subsequent input handling. Please verify that this change:

  1. Doesn't interfere with normal key processing after resuming IO
  2. Doesn't cause any input buffering issues
✅ Verification successful

Let me analyze the findings and generate one more verification to fully understand the input processing flow.


Based on the analysis of the code, I can now provide a final response:

The injection of Key.Unknown during IO pause is safe and correctly handled.

The verification shows that:

  1. Key.Unknown is already a well-handled value in the input processing flow, used as a default/fallback key in multiple places
  2. The input processing system properly handles Key.Unknown through the key mapping system, where it's explicitly mapped to ConsoleKey.NoName
  3. The unget_wch is only used once in the codebase, specifically for this IO pause scenario, which means it won't interfere with other key processing logic
  4. The key event handling system is designed to properly process both known and unknown keys, making this implementation safe
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other uses of unget_wch to understand the impact
ast-grep --pattern 'Curses.unget_wch($_)'

# Search for Key.Unknown handling to verify proper processing
rg -A 5 'Key\.Unknown'

Length of output: 2346


Script:

#!/bin/bash
# Search for ProcessInput method implementation to understand how Key.Unknown is handled
ast-grep --pattern 'ProcessInput() {
  $$$
}'

# Search for any input processing or key handling methods that might be affected
rg -A 10 'ProcessKey|HandleKey|OnKey'

Length of output: 23697

@jinek
Copy link
Owner Author

jinek commented Dec 15, 2024

When I tried the branch on ubuntu it didn't display any accelerators...it wasn't clear if you were trying to disable showing the accelerators or trying to turn them on permentaly.

default ubuntu terminal? Could you please check if CursesConsole is instantiated in your scenario?
Could you please also check if underline is supported in that case at all?

@tomlm tomlm merged commit 8d96b05 into main Dec 15, 2024
2 checks passed
@tomlm tomlm deleted the 196-alt-key-accelerators-linux2 branch December 15, 2024 20:21
@tomlm
Copy link
Collaborator

tomlm commented Dec 15, 2024

it's good. I didn't notice there was a -linux and -linux2 branch, I was looking at the wrong one.

This was referenced Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alt Key accelerators aren't rendered
2 participants