Skip to content

feat: Add BracketTransform mode (replace Telex 2)#6

Merged
nhktmdzhg merged 4 commits into
LotusInputMethod:masterfrom
hthienloc:feature/bracket-transform
May 4, 2026
Merged

feat: Add BracketTransform mode (replace Telex 2)#6
nhktmdzhg merged 4 commits into
LotusInputMethod:masterfrom
hthienloc:feature/bracket-transform

Conversation

@hthienloc
Copy link
Copy Markdown

Summary

  • Remove Telex 2 input method definition
  • Add BracketTransform mode (FollowFlags, Disabled, NonStart, Everywhere)
  • Independent of input method (works with Telex, VNI, VIQR, etc.)
  • Add SetBracketTransformMode() to IEngine interface
  • Correctly handle upper/lower case transformations ([ -> ơ/Ơ, ] -> ư/Ư)

Changes

  • bamboo.go: Implement BracketTransform logic and update IEngine interface.
  • input_method_def.go: Remove Telex 2 and clean up [] / {} mappings.

hthienloc added 2 commits May 2, 2026 16:01
- Add EbracketTransform flag (independent of input method)
- Transform '[' to 'ơ' and ']' to 'ư' when flag is set
- Remove Telex 2 input method definition
- Update flag in EstdFlags
- Remove Telex 2 input method completely
- Add BracketTransformFollowFlags, Disabled, NonStart, Everywhere
- Add bracketTransformMode to BambooEngine (like w2uMode)
- Transform [ -> ơ (lower) / Ơ (upper) when enabled
- Transform ] -> ư (lower) / Ư (upper) when enabled
- Remove all [] and {} mappings from input_method_def.go
- Update FcitxBambooEngineOption struct
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a configurable bracket transformation feature to the Bamboo engine, allowing square brackets to be automatically converted to Vietnamese characters (ơ, ư) based on new engine modes and flags. Additionally, it refines and renames several input method definitions, such as merging Telex, VNI, and VIQR layouts. Review feedback identifies a logic error in the SetBracketTransformMode range check that prevents resetting to follow flags, and highlights that changing the VIQR mapping for 'Đ' from 'd' to '\' may break common typing shortcuts like 'dd'.

Comment thread bamboo.go Outdated
Comment thread input_method_def.go Outdated
@hthienloc hthienloc marked this pull request as draft May 2, 2026 09:50
@hthienloc hthienloc force-pushed the feature/bracket-transform branch 5 times, most recently from 8137bdd to 23f7312 Compare May 2, 2026 13:26
@hthienloc hthienloc marked this pull request as ready for review May 2, 2026 14:38
@hthienloc hthienloc force-pushed the feature/bracket-transform branch from 1dc4054 to 69b041a Compare May 2, 2026 15:06
@hthienloc hthienloc marked this pull request as draft May 2, 2026 15:07
@hthienloc hthienloc force-pushed the feature/bracket-transform branch from 69b041a to c10f692 Compare May 2, 2026 15:08
@hthienloc hthienloc force-pushed the feature/bracket-transform branch from c10f692 to 2764a62 Compare May 2, 2026 15:13
@hthienloc hthienloc marked this pull request as ready for review May 2, 2026 15:15
@nhktmdzhg nhktmdzhg merged commit 9197d2c into LotusInputMethod:master May 4, 2026
2 checks passed
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