@@ -41,21 +41,54 @@ FCITX_CONFIGURATION(
4141 KeyListOption triggerKeys{
4242 this ,
4343 " TriggerKeys" ,
44- _ (" Trigger Input Method" ),
44+ _ (" Toggle Input Method" ),
4545 {isApple () ? Key (" Control+Shift_L" ) : Key (" Control+space" ),
4646 Key (" Zenkaku_Hankaku" ), Key (" Hangul" )},
4747 KeyListConstrain ({KeyConstrainFlag::AllowModifierLess,
4848 KeyConstrainFlag::AllowModifierOnly})};
49- Option<bool > enumerateWithTriggerKeys{
50- this , " EnumerateWithTriggerKeys" ,
51- _ (" Enumerate when press trigger key repeatedly" ), true };
52- KeyListOption altTriggerKeys{
49+ OptionWithAnnotation<bool , ToolTipAnnotation> enumerateWithTriggerKeys{{
50+ .parent = this ,
51+ .path {" EnumerateWithTriggerKeys" },
52+ .description {_ (" Enumerate when holding modifier of Toggle key" )},
53+ .defaultValue = true ,
54+ .annotation {
55+ _ (" For example, if Control+Space is the toggle key, after pressing "
56+ " Control+Space for the first time, if Control is held, following "
57+ " key press of Space will enumerate the input method." )},
58+ }};
59+ KeyListOption activateKeys{
5360 this ,
54- " AltTriggerKeys" ,
55- _ (" Temporally switch between first and current Input Method" ),
56- {Key (" Shift_L" )},
61+ " ActivateKeys" ,
62+ _ (" Activate Input Method" ),
63+ {
64+ Key (" Hangul_Hanja" ),
65+ },
5766 KeyListConstrain ({KeyConstrainFlag::AllowModifierLess,
5867 KeyConstrainFlag::AllowModifierOnly})};
68+ KeyListOption deactivateKeys{
69+ this ,
70+ " DeactivateKeys" ,
71+ _ (" Deactivate Input Method" ),
72+ {Key (" Hangul_Romaja" )},
73+ KeyListConstrain ({KeyConstrainFlag::AllowModifierLess,
74+ KeyConstrainFlag::AllowModifierOnly})};
75+ KeyListOptionWithAnnotation<ToolTipAnnotation> altTriggerKeys{
76+ {.parent = this ,
77+ .path {" AltTriggerKeys" },
78+ .description {_ (" Temporarily Toggle Input Method" )},
79+ .defaultValue {{Key (" Shift_L" )}},
80+ .constrain {KeyListConstrain ({KeyConstrainFlag::AllowModifierLess,
81+ KeyConstrainFlag::AllowModifierOnly})},
82+ .annotation {_ (
83+ " This key can only be used if current state is active, or is "
84+ " deactivated with this key. For example, you have two input "
85+ " methods: English as the inactive state, Pinyin as the active "
86+ " state. It can be used to switch from Pinyin back to English, and "
87+ " switch back to Pinyin again afterwards. If the initial state is "
88+ " English will do nothing. This key can be configured to be some "
89+ " simple single modifier key like Shift, so it can be used with "
90+ " just a single key press, but won't be triggered by accident if "
91+ " you never activate input method." )}}};
5992 KeyListOption enumerateForwardKeys{
6093 this ,
6194 " EnumerateForwardKeys" ,
@@ -87,39 +120,24 @@ FCITX_CONFIGURATION(
87120 {Key (" Super+Shift+space" )},
88121 KeyListConstrain ({KeyConstrainFlag::AllowModifierLess,
89122 KeyConstrainFlag::AllowModifierOnly})};
90- KeyListOption activateKeys{
91- this ,
92- " ActivateKeys" ,
93- _ (" Activate Input Method" ),
94- {
95- Key (" Hangul_Hanja" ),
96- },
97- KeyListConstrain ({KeyConstrainFlag::AllowModifierLess,
98- KeyConstrainFlag::AllowModifierOnly})};
99- KeyListOption deactivateKeys{
100- this ,
101- " DeactivateKeys" ,
102- _ (" Deactivate Input Method" ),
103- {Key (" Hangul_Romaja" )},
104- KeyListConstrain ({KeyConstrainFlag::AllowModifierLess,
105- KeyConstrainFlag::AllowModifierOnly})};
106123 Option<KeyList, ListConstrain<KeyConstrain>, DefaultMarshaller<KeyList>,
107124 ToolTipAnnotation>
108- defaultPrevPage{this ,
109- " PrevPage" ,
110- _ (" Default Previous page" ),
111- {Key (" Up" )},
112- KeyListConstrain ({KeyConstrainFlag::AllowModifierLess}),
113- {},
114- {_ (" Input methods may have different setup in their "
115- " own configuration. This is commonly used by "
116- " modules like clipboard or quickphrase." )}};
125+ defaultPrevPage{{
126+ .parent = this ,
127+ .path {" PrevPage" },
128+ .description {_ (" Fallback Previous page" )},
129+ .defaultValue {{Key (" Up" )}},
130+ .constrain {{KeyConstrainFlag::AllowModifierLess}},
131+ .annotation {_ (" Input methods may have different setup in their "
132+ " own configuration. This is commonly used by "
133+ " modules like clipboard or quickphrase." )},
134+ }};
117135
118136 Option<KeyList, ListConstrain<KeyConstrain>, DefaultMarshaller<KeyList>,
119137 ToolTipAnnotation>
120138 defaultNextPage{this ,
121139 " NextPage" ,
122- _ (" Default Next page" ),
140+ _ (" Fallback Next page" ),
123141 {Key (" Down" )},
124142 KeyListConstrain ({KeyConstrainFlag::AllowModifierLess}),
125143 {},
@@ -129,13 +147,13 @@ FCITX_CONFIGURATION(
129147 KeyListOption defaultPrevCandidate{
130148 this ,
131149 " PrevCandidate" ,
132- _ (" Default Previous Candidate" ),
150+ _ (" Fallback Previous Candidate" ),
133151 {Key (" Shift+Tab" )},
134152 KeyListConstrain ({KeyConstrainFlag::AllowModifierLess})};
135153 KeyListOption defaultNextCandidate{
136154 this ,
137155 " NextCandidate" ,
138- _ (" Default Next Candidate" ),
156+ _ (" Fallback Next Candidate" ),
139157 {Key (" Tab" )},
140158 KeyListConstrain ({KeyConstrainFlag::AllowModifierLess})};
141159 KeyListOption togglePreedit{this ,
@@ -193,16 +211,17 @@ FCITX_CONFIGURATION(
193211 overrideXkbOption{
194212 this ,
195213 " OverrideXkbOption" ,
196- _ (" Override Xkb Option" ),
214+ _ (" Override XKB Option" ),
197215 false ,
198216 {},
199217 {},
200- {_ (" Whether to override the xkb option from display server. It "
201- " will "
202- " not affect the xkb option send to display, but just the xkb "
203- " options for custom xkb layout." )}};
218+ {_ (" Whether to override the XKB option from display server. It "
219+ " will not affect the XKB option send to display, but just the "
220+ " XKB options for custom XKB layout. This is a workaround when "
221+ " there is no way to get the current XKB option from Wayland "
222+ " Compositor." )}};
204223 ConditionalHidden<!hasKeyboard, Option<std::string>> customXkbOption{
205- this , " CustomXkbOption" , _ (" Custom Xkb Option" ), " " };
224+ this , " CustomXkbOption" , _ (" Custom XKB Option" ), " " };
206225 HiddenOption<std::vector<std::string>> enabledAddons{
207226 this , " EnabledAddons" , " Force Enabled Addons" };
208227 HiddenOption<std::vector<std::string>> disabledAddons{
0 commit comments