fix: respect wlroots hotkey keycode mode#293
Open
mx6436 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Hey - 我在这里提供了一些高层面的反馈:
- controllerType 规范化逻辑(将带有 use_win32_vk_code 的 WlRoots 映射到 "Win32")现在嵌入在这里;建议把这部分提取到一个共享的 helper 中,这样以后任何依赖 controller 类型的逻辑都可以使用单一且一致的“真值来源”。
- 与其在代码中硬编码字符串字面量 "WlRoots" 和 "Win32",不如考虑使用现有的枚举或集中定义的 controller 类型常量,以减少拼写错误的风险并简化未来的重构。
给 AI Agents 的提示
Please address the comments from this code review:
## Overall Comments
- The controllerType normalization logic (mapping WlRoots with use_win32_vk_code to 'Win32') is now embedded here; consider extracting this into a shared helper so that any future logic relying on controller types uses a single, consistent source of truth.
- Instead of hardcoding the string literals 'WlRoots' and 'Win32', consider using existing enums or centralized constants for controller types to reduce the risk of typos and simplify future refactors.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据这些反馈改进为你提供的代码评审。
Original comment in English
Hey - I've left some high level feedback:
- The controllerType normalization logic (mapping WlRoots with use_win32_vk_code to 'Win32') is now embedded here; consider extracting this into a shared helper so that any future logic relying on controller types uses a single, consistent source of truth.
- Instead of hardcoding the string literals 'WlRoots' and 'Win32', consider using existing enums or centralized constants for controller types to reduce the risk of typos and simplify future refactors.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The controllerType normalization logic (mapping WlRoots with use_win32_vk_code to 'Win32') is now embedded here; consider extracting this into a shared helper so that any future logic relying on controller types uses a single, consistent source of truth.
- Instead of hardcoding the string literals 'WlRoots' and 'Win32', consider using existing enums or centralized constants for controller types to reduce the risk of typos and simplify future refactors.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复在 wlroots 已经启用 use_win32_vk_code 的情况下,仍然为 hotkey 生成 evdev 键码的问题
Summary by Sourcery
Bug Fixes:
Original summary in English
Summary by Sourcery
Bug Fixes: