@@ -98,6 +98,11 @@ 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 };
102+
103+ FCITX_CONFIG_ENUM_NAME_WITH_I18N (TreatBackspaceAsEscapeOnPrediction, N_(" No" ),
104+ N_ (" With virtual keyboard" ), N_(" Yes" ))
105+
101106enum class CorrectionLayout {
102107 None,
103108 Qwerty,
@@ -188,6 +193,12 @@ FCITX_CONFIGURATION(
188193 isAndroid ()};
189194 Option<int , IntConstrain> predictionSize{
190195 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};
191202 OptionWithAnnotation<SwitchInputMethodBehavior,
192203 SwitchInputMethodBehaviorI18NAnnotation>
193204 switchInputMethodBehavior{this , " SwitchInputMethodBehavior" ,
0 commit comments