@@ -98,10 +98,16 @@ enum class PreeditMode { No, ComposingPinyin, CommitPreview };
9898FCITX_CONFIG_ENUM_NAME_WITH_I18N (PreeditMode, N_(" Do not show" ),
9999 N_ (" Composing pinyin" ), N_(" Commit preview" ))
100100
101- enum class TreatBackspaceAsEscapeOnPrediction { No, WithVirtualKeyboard, Yes };
101+ enum class BackspaceBehaviorOnPrediction {
102+ OnlyClearCandidates,
103+ ClearCandidatesAndBackspace,
104+ BackspaceWhenNotUsingOnScreenKeyboard
105+ };
102106
103- FCITX_CONFIG_ENUM_NAME_WITH_I18N (TreatBackspaceAsEscapeOnPrediction, N_(" No" ),
104- N_ (" With virtual keyboard" ), N_(" Yes" ))
107+ FCITX_CONFIG_ENUM_NAME_WITH_I18N (
108+ BackspaceBehaviorOnPrediction, N_(" Only Clear candidates" ),
109+ N_ (" Clear candidates & backspace" ),
110+ N_ (" Backspace when not using on-screen keyboard" ))
105111
106112enum class CorrectionLayout {
107113 None,
@@ -193,12 +199,12 @@ FCITX_CONFIGURATION(
193199 isAndroid ()};
194200 Option<int , IntConstrain> predictionSize{
195201 this , " PredictionSize" , _ (" Prediction Size" ), 49 , IntConstrain (3 , 100 )};
196- OptionWithAnnotation<TreatBackspaceAsEscapeOnPrediction ,
197- TreatBackspaceAsEscapeOnPredictionI18NAnnotation >
198- treatBackspaceAsEscapeOnPrediction {
199- this , " TreatBackspaceAsEscapeOnPrediction " ,
200- _ (" Treat BackSpace as Escape on prediction" ),
201- TreatBackspaceAsEscapeOnPrediction::WithVirtualKeyboard };
202+ OptionWithAnnotation<BackspaceBehaviorOnPrediction ,
203+ BackspaceBehaviorOnPredictionI18NAnnotation >
204+ backspaceBehaviorOnPrediction {
205+ this , " BackspaceBehaviorOnPrediction " ,
206+ _ (" Backspace behavior on prediction" ),
207+ BackspaceBehaviorOnPrediction::BackspaceWhenNotUsingOnScreenKeyboard };
202208 OptionWithAnnotation<SwitchInputMethodBehavior,
203209 SwitchInputMethodBehaviorI18NAnnotation>
204210 switchInputMethodBehavior{this , " SwitchInputMethodBehavior" ,
0 commit comments