File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ ChordComposer::ChordComposer(const Ticket& ticket) : Processor(ticket) {
25
25
string alphabet;
26
26
config->GetString (" chord_composer/alphabet" , &alphabet);
27
27
chording_keys_.Parse (alphabet);
28
+ config->GetBool (" chord_composer/use_control" , &use_control_);
29
+ config->GetBool (" chord_composer/use_alt" , &use_alt_);
30
+ config->GetBool (" chord_composer/use_shift" , &use_shift_);
28
31
config->GetString (" speller/delimiter" , &delimiter_);
29
32
algebra_.Load (config->GetList (" chord_composer/algebra" ));
30
33
output_format_.Load (config->GetList (" chord_composer/output_format" ));
@@ -84,6 +87,10 @@ inline static int get_base_layer_key_code(const KeyEvent& key_event) {
84
87
ProcessResult ChordComposer::ProcessChordingKey (const KeyEvent& key_event) {
85
88
if (key_event.ctrl () || key_event.alt ()) {
86
89
raw_sequence_.clear ();
90
+ }
91
+ if (key_event.ctrl () && !use_control_ ||
92
+ key_event.alt () && !use_alt_ ||
93
+ key_event.shift () && !use_shift_) {
87
94
ClearChord ();
88
95
return kNoop ;
89
96
}
Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ class ChordComposer : public Processor {
38
38
Projection algebra_;
39
39
Projection output_format_;
40
40
Projection prompt_format_;
41
+ bool use_control_ = false ;
42
+ bool use_alt_ = false ;
43
+ bool use_shift_ = false ;
41
44
42
45
set<int > pressed_;
43
46
set<int > chord_;
You can’t perform that action at this time.
0 commit comments